连接到微软的ODBC用于Oracle的Oracle 10g数据库微软、连接到、数据库、ODBC

2023-09-04 00:11:56 作者:光与影之间没有交点°

我想使用内置的Microsoft ODBC Oracle驱动程序连接到Oracle 10g数据库。我想用一个dnsless连接,所以我抓住从 www.connectionstrings.com 我的连接字符串。

I'm trying to connect to an Oracle 10g database using the built in Microsoft ODBC for Oracle driver. I want to use an dnsless connection, so I grab my connection string from www.connectionstrings.com.

在理想情况下,我不会要设置的DNS条目或Oracle TNS条目,我可能是错了,但我想上面会为我做的。我发现了以下内容:

Ideally I won't have to setup a DNS entry or an Oracle TNS entry, and I may be mistaken, but I thought the above would do that for me. I'm getting the following:

ERROR [NA000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-12514:
TNS:listener does not currently know of service requested in connect
descriptor

ERROR [IM006] [Microsoft][ODBC Driver Manager]
Driver's SQLSetConnectAttr failed

ERROR [01000] [Microsoft][ODBC Driver Manager] 
The driver doesn't support the version of ODBC behavior that the
application requested (see SQLSetEnvAttr)."

据我可以在网上告诉,其他人都使用了微软的ODBC Oracle驱动程序连接到10G,但也许我失去了一些东西。我是从一个vb.net应用程序的方式连接。

As far as I can tell online, other people have used the Microsoft ODBC for Oracle driver to connect to 10g, but maybe I'm missing something. I'm connecting from a vb.net application by the way.

推荐答案

我不知道它是如何犹太回答你自己的问题,但我发现一个连接字符串,它是更多的东西我要找:

I'm not sure how kosher it is to answer your own question, but I found a connection string that is more what I'm looking for:

"Driver={Microsoft ODBC for Oracle}; " & _
                                 "CONNECTSTRING=(DESCRIPTION=" & _
                                 "(ADDRESS=(PROTOCOL=TCP)" & _
                                 "(HOST=myserver)(PORT=1521))" & _
                                 "(CONNECT_DATA=(SERVICE_NAME=servicename))); " & _
                                 "uid=username;pwd=password;