orasession

场景:如何在代码中指定OraSession

怎么在代码中指定OraSession
我使用的是ODAC控件,想在代码中指定OraSession,这样写却报错了。请指教

OraSession1->->Disconnect();
OraSession1->ConnectString = "qjh/qjh@127.0.0.1:1521:orcl";
OraSession1->->Connect();

错误提示: Project mypro.exe raised exception class EAccessViolation with message 'Access violation at address 00402116 in moudle 'mypro.exe'. Read of address 00000058'. Process stopped. Use Step or Ron to continue.

------解决方案--------------------
看起来象是访问了一个未经初始化的对象(对象为NULL,00000058是某个属性或方法的偏移)
------解决方案--------------------
你的连接串没有错你设置这个了没有OraS->Options->Net = true;就是使用net形式 你竟然发了两个同样的,呵呵