Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Connecting to Oracle Server using ADO

Status
Not open for further replies.

Dineshkg

MIS
May 18, 2003
3
US
Dear Friends,

I have a problem with connecting to ORacle. I am using ADO and DSN-less connection.
My machine name is pb10 and the ip address is 10.53.6.79. My oralce database name is pbora. PBORA in pb10 is the server. The program also resides in pb10. The form load section appers like this:

Private Sub Form_Load()

Set db = New ADODB.Connection
Set db1 = New ADODB.Connection

db.Open "Driver={Microsoft ODBC for
Oracle};server=pbora;uid=rules;pwd=rules;"
db1.Open "Driver={Microsoft ODBC for
Oracle};server=pbora;uid=rules;pwd=rules;"

rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open "select * from ooreg", db

End Sub

The other recordset is done in other event.

The program works fine in the particular machine (pb10) where the program is written.

But it is not working in other systems and is searching for the local oracle. The error message is "TNS could not resolve service name".

Kindly help me, how to connect to oracle in pb10 from other machines. I also don;t want to create DSN in each and every system. Also, should I install VB in all the machies or just making the program as .exe file is enough. Kindly help me please. Also let me know how to specify the server in the syntax above. Machine name = pb10, DB name is PBORA and IP address of pb10 is 10.53.6.79.

Thanks in advance.

 
You could try taking a look at microsoft data link - it will build you a connection string and test the connection to see if it's valid.

This feature is also available within the adodc control.

Hope it helps,
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top