Question : Connect Oracle dataase through VB6

I'm using VB6  and trying to connecto to Oracle database so I build an connection on the main Module like below

Public con As New Connection
con.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=darsh; password=password;Data Source=sagelive"

and the connection is works but from the application when I try to run any select statement it gives me run time error 3709 and the code I'm using on the application is :

Dim rs As New ADODB.Recordset
 rs.Open "select * from sagelive.poheadm", con, adOpenKeyset, adLockPessimistic

Please advice how I can get the select statment works.

thanks
Mostafa

Answer : Connect Oracle dataase through VB6

oops,  sorry,  MSDASQL is for ODBC,  not sql server (although it would work for that too)

I do recommend using the oracle provider but that's a different discussion than your question here, go ahead and put the odbc provider back.

Do other open options work?

Such as "adOpenForwardOnly, adLockReadOnly"  instead of keyset/pessimistic ?
Random Solutions  
 
programming4us programming4us