saurabh.sauron
Ambassador of Buzz
I am facing problems in connecting VB To Oracle. Here is the code that i have used
The Error:
Run Time Error 3001.
Arguments are of wrong type, unacceptable range or are in conflict with one another.
pls help
thnx
Code:
Public Sub Conn()
Dim cn As New ADODB.Connection
Dim constr As String
Set cn = New ADODB.Connection
constr = "Provider=MSDAORA.1;user id=scott;password=tiger"
cn.Open constr
End Sub
Code:
Dim rs As New ADODB.Recordset
Dim sqlstr As String
Private Sub Command1_Click()
Call Module1.Conn
rs.CursorLocation = adUseClient
strsql = "Select * from users;"
rs.Open strsql, cn, adOpenDynamic, adLockOptimistic, adCmdText
If cn.State = adStateOpen Then
MsgBox "Open"
Else: MsgBox "Closed"
End If
End Sub
The Error:
Run Time Error 3001.
Arguments are of wrong type, unacceptable range or are in conflict with one another.
pls help
thnx