在cb里连接ORacle数据库,出现ORA-06413错误,兄弟们救命

wt_sanlian 2004-11-17 08:00:52
我的一个Form里有三个TDatabase组件,一个用来连接到SQL SERVER,其余两个用来连接到ORACLE,在设计模式下,三个组件的Connected属性可以同时设为TRUE,但一运行,SQL Server组件正常连接上,但其余两个连接ORACLE的组件出现错误 “ORA - 06413 数据库未连接"错误。

之后,我新建了一个工程做试验,同时放上三个数据库组件,同时将Connected设为True,然后运行,一切正常。


这是怎么一回事呢,有没有高手遇到过,请指点一二!
...全文
164 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
linglingchen 2004-11-19
  • 打赏
  • 举报
回复
因為你用的是oracle數據庫,而oracle采用它的tnsnames.ora文件中建立的字符串來與遠端的數據庫連接,而字符串是以英文輸入法方式下的()來做分隔符的,所以你的文件夾的名稱如果帶有這樣的(),在解析時候就出現錯誤
铖邑 2004-11-19
  • 打赏
  • 举报
回复
可能是因为驱动程序需要将应用名称(全路径)在会话中登记,所以造成这种错误
wt_sanlian 2004-11-18
  • 打赏
  • 举报
回复
找到原因了,原来应用程序所在的目录名不能有"("或 ")",真莫名其妙
谢谢各位
sczyq 2004-11-18
  • 打赏
  • 举报
回复
将FORM里建几个按钮,用来手动打开连接TDatabase组件看看。

或设计时Connected属性可以同时设为false, 运行时在FORM的ONCREATE事件里将Connected属性置为TRUE。

netsys2 2004-11-18
  • 打赏
  • 举报
回复
06413, 00000, "Connection not open."
*Cause: Unable to establish connection.
*Action: Use diagnostic procedures to ascertain exact problem.


没有遇到过这个问题,不过据oracle说,这个问题是因为你的机器名使用了reserved symbols ,解决步骤

To check on Windows95/98/NT:

1. Right click the Network Neighborhood Icon on your desktop.
2. Select Properties.
3. Within the Network Properties window, select the Identification Tab.
4. Verify the Computer Name box does not contain any of the reserved
symbols, change if necessary.
5. Check the DNS configuration.
6. On Windows NT, select the Protocols Tab, on Windows95/98 select the
TCP/IP-> Network Adapter from the list under the Configuration Tab.
7. Select Properties.
8. Select the DNS Tab on NT, DNS Configuraiton on Windows98/95.
9. Verify the Host Name box does not contain any of the reserved
symbols, change if necessary.

tangyong12 2004-11-18
  • 打赏
  • 举报
回复
检查一下数据库是否已经启动!

1,178

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder 数据库及相关技术
社区管理员
  • 数据库及相关技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧