太郎
一个老外的VBS连接ORACLE数据库资料
上一篇 /
下一篇 2009-01-20 14:39:59
I have a VB app that connects successfully to a 10g database using the following code:
N
[)v
]G.M6pv6iBM0,lr$Z)mF0Private m_Connection As Object
51Testing软件测试网 nVO lQYsConnectionString = "PROVIDER=OraOLEDB.Oracle.1;USER ID=QUESTAPP;PASSWORD=xxxxx;DATA SOURCE=XOQLTEST;"
51Testing软件测试网Z#K8L(YLa-H...
%hO(h^f6J:N'O0Set m_Connection = CreateObject("ADODB.Connection")
(pn
J@{C_0m_Connection.Open sConnectionString
,TCV
IRn051Testing软件测试网Z3zs:UBOpK%D&`KHowever I also have a c++ app that connects in an extremely familiar way but fails with the error 'Provider cannot be found' see code:
K&p5kC.y"T0 {Q7d)Si"_0b_tConnectionString = _bstr_t("PROVIDER=OraOLEDB.Oracle.1;USER ID=QUESTAPP;PASSWORD=xxxxx;DATA SOURCE=XOQLTEST;");
51Testing软件测试网/nwGD"R"F...
51Testing软件测试网-P&i']8W'c
`_ConnectionPtr spConnection;
51Testing软件测试网#{"z"A8m%wv.YHRESULT hr = spConnection.CreateInstance(__uuidof( Connection ));
*?2nX
[x v7sZ0spConnection->PutCursorLocation(adUseClient);
51Testing软件测试网n!Q$v1p.PQ"WlhVspConnection->Open(b_tConnectionString, L"", L"", adConnectUnspecified);
_ ks*]rd+m0E4z*c%e3G8h
V0Anyone know why this would be the case? I am running both apps on the machine that hosts the database.
收藏
举报
TAG: