torturedmind
Programmer
Good day good Sirs/Ma'ams.
It is my first time to try a DSN-less connection to our Oracle server using the connection string from and from the help file. It was said that no TNSNAMES.ORA file is needed as long as the Oracle ODBC driver is installed, the code below should work. But it doesn't. The ODBC connection dialog box pops up and keeps asking for the service name every time even though it is already specified in the code (blue text). If I manually type the service name in the dialog box, ora_conn is a positive number. That means it is still reading the TNSNAMES.ORA. Anyone have ideas?
TIA
kilroy
philippines
"Once a king, always a king. But being a knight is more than enough."
It is my first time to try a DSN-less connection to our Oracle server using the connection string from and from the help file. It was said that no TNSNAMES.ORA file is needed as long as the Oracle ODBC driver is installed, the code below should work. But it doesn't. The ODBC connection dialog box pops up and keeps asking for the service name every time even though it is already specified in the code (blue text). If I manually type the service name in the dialog box, ora_conn is a positive number. That means it is still reading the TNSNAMES.ORA. Anyone have ideas?
Code:
ora_conn = SQLSTRINGCONNECT("DRIVER={Oracle in OraClient10g_home1};" + ;
[COLOR=#3465A4]"SERVER=" + ;
"(DESCRIPTION = " + ;
"(ADDRESS = " + ;
"(PROTOCOL = TCP)(HOST = XXX.XXX.XXX.XXX)(PORT = XXX))" + ;
"(CONNECT_DATA = " + ;
"(SERVICE_NAME = OurDbServiceName)));" + ;[/color]
"UID=dbuser;" + ;
"PWD=dbpw;")
TIA
kilroy
philippines
"Once a king, always a king. But being a knight is more than enough."