469,917 Members | 1,891 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Error using ODBC on Win2k

Please help point me in the right direction.

I am trying to SQLDriverConnect to our Oracle Server, which resides on
another machine in the network.

I believe I have the ODBC connection set up correctly, as clicking
"Test Connection" and then entering a valid username/password connects
successfully.

Here is the tnsnames.ora file from my client machine:

CSDWORLD=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = w4533071)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = csdworld)
)
)

As you can see, the remote host is w4533071, which I can ping, etc
from my box, and I can connect to that remote database using the
various Oracle tools like SQL Plus or Enterprise Manager Console.

Here is the relevant ODBC trace section:
---------------------------------------------------
SRV40 98c-588 ENTER SQLDriverConnectW
HDBC 019D2188
HWND 00000000
WCHAR * 0x01997310 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x01997310
SWORD 8
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

SRV40 98c-588 EXIT SQLDriverConnectW with return code -1
(SQL_ERROR)
HDBC 019D2188
HWND 00000000
WCHAR * 0x01997310 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x01997310
SWORD 8
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

DIAG [08004] [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve
service name
(12154)

DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed (0)
---------------------------------------------------

If it matters, my test application is written in Visual C++ 6.0,
latest service pack.

Oracle version 9.2 .

Please get me started, and I look forward to trying your suggestions.

Regards,

JaeGuk Lee
Seoul, South of Korea
Nov 17 '05 #1
0 758

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by CD | last post: by
1 post views Thread by MyndPhlyp | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.