11-25-2010, 07:30 PM
Hi All,
I am testing a Java Swing application which uses Oracle 10g as back-end.
I have Oracle client installed in my machine and I access database from a remote machine.
I wrote following snippet of codes and when ran it, I got some TNS:protocol adapter error(Attached is the screenshot of the error)
I have cross-checked many times and confirmed that server,uid,pwd etc. are correct.
Can somebody help me solving this? Any suggestion is highly apprciated.
I am testing a Java Swing application which uses Oracle 10g as back-end.
I have Oracle client installed in my machine and I access database from a remote machine.
I wrote following snippet of codes and when ran it, I got some TNS:protocol adapter error(Attached is the screenshot of the error)
Quote:Const adOpenStatic = 3
Const adLockOptimistic = 3
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")
objConnection.Provider = "OraOLEDB.Oracle"
objConnection.open "server=XXXX;uid=YYYYYY;pwd=ZZZZZZ;database=AAAAA"
objRecordSet.Open "select ABC from RPQL",objConnection, adOpenStatic,adLockOptimistic
objRecordSet.MoveFirst
msgbox objRecordSet.RecordCount
I have cross-checked many times and confirmed that server,uid,pwd etc. are correct.
Can somebody help me solving this? Any suggestion is highly apprciated.