Please need Help VB6 and Oracle 9i db COnnection [message #165198] |
Tue, 28 March 2006 22:13 |
josefIT
Messages: 1 Registered: March 2006 Location: Philippines
|
Junior Member |
|
|
Hi!
this is my code in VB when i connect to Oracle... in the local machine where my oracle database is installed it works well but when my application is deployed in other workstation it doesnt work it display TNS Adapter Error.
this is my code:
--------------------------------------------------------
Private Sub cmdQuery_Click()
Dim dbConn As Connection
Dim dbRecordset As Recordset
lstResult.Clear
Set dbConn = New Connection
dbConn.Open "Provider=OraOLEDB.Oracle; User ID=intrapsrg; Password=intrapsrg2k5; Database=orajosef; Persist Security Info=Tue"
With dbConn
End With
Set dbRecordset = New Recordset
dbRecordset.Open "select * from books", dbConn, adOpenForwardOnly, adLockReadOnly
Do Until dbRecordset.EOF
lstResult.AddItem dbRecordset(0) & " **** " & dbRecordset(1)
dbRecordset.MoveNext
Loop
dbRecordset.Close
dbConn.Close
Set dbRecordset = Nothing
Set dbConn = Nothing
End Sub
-----------------------------------------------------------
please help thanks!
|
|
|
|