太郎

一个老外的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 Object51Testing软件测试网nVO lQY
sConnectionString = "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:U BOpK%D&`K
However 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.Y
HRESULT hr = spConnection.CreateInstance(__uuidof( Connection ));
*?2nX [xv7s Z0spConnection->PutCursorLocation(adUseClient);51Testing软件测试网n!Q$v1p.PQ"WlhV
spConnection->Open(b_tConnectionString, L"", L"", adConnectUnspecified);
_ks*]rd+m0
E4z*c%e3G8h V0Anyone know why this would be the case? I am running both apps on the machine that hosts the database.

TAG:

 

评分:0

我来说两句

日历

« 2024-02-17  
    123
45678910
11121314151617
18192021222324
2526272829  

数据统计

  • 访问量: 8699
  • 日志数: 19
  • 建立时间: 2008-06-11
  • 更新时间: 2009-05-06

RSS订阅

Open Toolbar