Home » Infrastructure » Windows » Cannot connect to remote Oracle via VB
Cannot connect to remote Oracle via VB [message #99696] Thu, 21 February 2002 10:48 Go to next message
SW
Messages: 1
Registered: February 2002
Junior Member
I am trying to write a VB application that requires to connect to a remote Oracle database but I encoutered the following error message:

TNS-12560: TNS:Protocol adapter error
TNS-00530: Protocol adapter error 32-bit Windows Error:
161 : Unknown Error

I have no problem connecting to the database via SQLPlus.
I turned on the tracer and get the following:

VB6 3c4-5ec ENTER SQLAllocEnv
HENV * 1F70D574

VB6 3c4-5ec EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS)
HENV * 0x1F70D574 ( 0x040f15c8)

VB6 3c4-5ec ENTER SQLGetEnvAttr
SQLHENV 040F15C8
SQLINTEGER 201 <unknown>
SQLPOINTER [[Unknown attribute 201]]
SQLINTEGER 4
SQLINTEGER * 0x0012B140

VB6 3c4-5ec EXIT SQLGetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 040F15C8
SQLINTEGER 201 <unknown>
SQLPOINTER [[Unknown attribute 201]]
SQLINTEGER 4
SQLINTEGER * 0x0012B140 (1836932)

VB6 3c4-5ec ENTER SQLAllocEnv
HENV * 1F70D578

VB6 3c4-5ec EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS)
HENV * 0x1F70D578 ( 0x040f1670)

VB6 3c4-5ec ENTER SQLSetEnvAttr
SQLHENV 040F1670
SQLINTEGER 201 <unknown>
SQLPOINTER [[Unknown attribute 201]]
SQLINTEGER -6

VB6 3c4-5ec EXIT SQLSetEnvAttr with return code 0 (SQL_SUCCESS)
SQLHENV 040F1670
SQLINTEGER 201 <unknown>
SQLPOINTER [[Unknown attribute 201]]
SQLINTEGER -6

VB6 3c4-5ec ENTER SQLAllocConnect
HENV 040F1670
HDBC * 0012BC14

VB6 3c4-5ec EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS)
HENV 040F1670
HDBC * 0x0012BC14 ( 0x040f1718)

VB6 3c4-5ec ENTER SQLGetInfoW
HDBC 040F1718
UWORD 10 <SQL_ODBC_VER>
PTR 0x0012BBE4
SWORD 22
SWORD * 0x00000000

VB6 3c4-5ec EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS)
HDBC 040F1718
UWORD 10 <SQL_ODBC_VER>
PTR 0x0012BBE4
SWORD 22
SWORD * 0x00000000

VB6 3c4-5ec ENTER SQLSetConnectAttrW
SQLHDBC 040F1718
SQLINTEGER 101 <SQL_ATTR_ACCESS_MODE>
SQLPOINTER 0x00000001
SQLINTEGER -6

VB6 3c4-5ec EXIT SQLSetConnectAttrW with return code 0 (SQL_SUCCESS)
SQLHDBC 040F1718
SQLINTEGER 101 <SQL_ATTR_ACCESS_MODE>
SQLPOINTER 0x00000001 (BADMEM)
SQLINTEGER -6

VB6 3c4-5ec ENTER SQLSetConnectAttrW
SQLHDBC 040F1718
SQLINTEGER 103 <SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x0000000F
SQLINTEGER -6

VB6 3c4-5ec EXIT SQLSetConnectAttrW with return code 0 (SQL_SUCCESS)
SQLHDBC 040F1718
SQLINTEGER 103 <SQL_ATTR_LOGIN_TIMEOUT>
SQLPOINTER 0x0000000F (BADMEM)
SQLINTEGER -6

VB6 3c4-5ec ENTER SQLDriverConnectW
HDBC 040F1718
HWND 00000000
WCHAR * 0x1F7F8B88 [[ -3]] "****** 0"
SWORD -3
WCHAR * 0x1F7F8B88
SWORD 8
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

VB6 3c4-5ec EXIT SQLDriverConnectW with return code -1 (SQL_ERROR)
HDBC 040F1718
HWND 00000000
WCHAR * 0x1F7F8B88 [[ -3]] "****** 0"
SWORD -3
WCHAR * 0x1F7F8B88
SWORD 8
SWORD * 0x00000000
UWORD 0 <SQL_DRIVER_NOPROMPT>

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

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

DIAG [[01S00]] [[Microsoft]][[ODBC driver for Oracle]]Invalid connection string attribute (0)

VB6 3c4-5ec ENTER SQLGetDiagRecW
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 1
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C

VB6 3c4-5ec EXIT SQLGetDiagRecW with return code 0 (SQL_SUCCESS)
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 1
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94 (0)
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C (66)

VB6 3c4-5ec ENTER SQLGetDiagRecW
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 2
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C

VB6 3c4-5ec EXIT SQLGetDiagRecW with return code 0 (SQL_SUCCESS)
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 2
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94 (0)
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C (66)

VB6 3c4-5ec ENTER SQLGetDiagRecW
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 3
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C

VB6 3c4-5ec EXIT SQLGetDiagRecW with return code 0 (SQL_SUCCESS)
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 3
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94 (0)
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C (70)

VB6 3c4-5ec ENTER SQLGetDiagRecW
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 4
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C

VB6 3c4-5ec EXIT SQLGetDiagRecW with return code 100 (SQL_NO_DATA_FOUND)
SQLSMALLINT 2
SQLHANDLE 040F1718
SQLSMALLINT 4
SQLWCHAR * 0x0012BB78 (NYI)
SQLINTEGER * 0x0012BB94
SQLWCHAR * 0x0012B778 (NYI)
SQLSMALLINT 512
SQLSMALLINT * 0x0012BB9C

VB6 3c4-5ec ENTER SQLFreeConnect
HDBC 040F1718

VB6 3c4-5ec EXIT SQLFreeConnect with return code 0 (SQL_SUCCESS)
HDBC 040F1718
Re: Cannot connect to remote Oracle via VB [message #99864 is a reply to message #99696] Thu, 02 May 2002 04:02 Go to previous messageGo to next message
David Quinlan
Messages: 2
Registered: May 2002
Junior Member
Hi,

I have had similar problems.

It depends on the connect string you us in VB to open your connection to the Oracle Database.

Using the Microsoft ODBC Driver for Oracle, it doesn't work (although I'm sure it has in the past with MDAC2.5)

Using the Oracle ODBC Driver it works...

Try:

Provider=OraOLEDB.Oracle.1;Password={your password};Persist Security Info=True;User ID={Your User ID};Data Source={Your Data Source}

Regards

David

Re: procedure to connect Oracle sql to VB6 [message #99991 is a reply to message #99696] Mon, 10 June 2002 23:45 Go to previous messageGo to next message
mak
Messages: 6
Registered: June 2002
Junior Member
hello
i would aprreciate if u mail me the procedure to connect sql plus with vb
thanks
Re: Cannot connect to remote Oracle via VB [message #100211 is a reply to message #99696] Mon, 09 September 2002 00:04 Go to previous messageGo to next message
somorjit yambemcha
Messages: 1
Registered: September 2002
Junior Member
sir
i am trying to connect vb and oracle.i have an error that give message IM006:[[microsoft]][[odbc]]Drivermanager]]driver's SQLsetconnectattr fail ,i try a lot but i didn't got the solution,and i also installed the oracle8 personel for windows95 &NT to windows 98.is it due to incompatable OS or due to coding,please help in my problem and i will remain you forever if you help me,it is for my project
yours
somorjit
Re: procedure to connect Oracle sql to VB6 [message #100271 is a reply to message #99991] Fri, 27 September 2002 21:06 Go to previous messageGo to next message
chaduthra
Messages: 1
Registered: September 2002
Junior Member
How to connect Oracle with VB Tell me in full detail,Please
Re: Cannot connect to remote Oracle via VB [message #100325 is a reply to message #99696] Tue, 15 October 2002 04:14 Go to previous messageGo to next message
Ashish Moses
Messages: 1
Registered: October 2002
Junior Member
Hi! I am also having the same problem. I would like to know the exact connection string and references to use for an ADO connection. If you have found a way to do it, please reply.

in earnest
Ashish
Re: procedure to connect Oracle to VB6 [message #100348 is a reply to message #99696] Thu, 31 October 2002 22:16 Go to previous messageGo to next message
Shyamal
Messages: 3
Registered: October 2002
Junior Member
hi
i have vb6 enterprice edition and oracle 8i personal edition plz tell me hot connect them in windows98 environment.
shyamal
Re: procedure to connect Oracle to VB6 [message #100406 is a reply to message #100348] Sat, 14 December 2002 00:37 Go to previous messageGo to next message
sachin h jagtap
Messages: 1
Registered: December 2002
Junior Member
i want to connect oracle 8i with vb6 using oracle data controal and without oracle data control. Please give me the detail procedure for same.
Re: Cannot connect to remote Oracle via VB [message #100512 is a reply to message #99696] Fri, 31 January 2003 09:15 Go to previous messageGo to next message
saurav
Messages: 2
Registered: December 2001
Junior Member
SIR,
I AM WORKING ON AN AIRLINE RESERVATION PROJECT AND I AM NOT ABLE TO CONNECT IT WITH ORACLE.
Re: procedure to connect Oracle to VB6 [message #101393 is a reply to message #100406] Sun, 12 September 2004 07:17 Go to previous message
jagaraj
Messages: 1
Registered: September 2004
Junior Member
I want connect oracle 8i with vb6 using ADO control
Previous Topic: ADO Connection to Oracle, URGENT HELP NEEDED PLEASE!
Next Topic: Parameters for Oracle stored Procedure - Cursor
Goto Forum:
  


Current Time: Thu Apr 18 13:43:47 CDT 2024