I am trying to convert an ODBC VB4 program to ADODB. I have set it up in the following manner:
Public mdbPICS as ADODB.Connection
Public gsConnect as String
Dim lsServer as String * 255
gsConnect = "Provider=sqloledb.1" & _
";PWD=" & gsPASSWORD & _
";UID=" & gsUSER & _
";Initial Catalog=" & gsPICS_DATABASE & _
";Data Source= " & lsServer
Set gdbPICS = New ADODB.Connection
gdbPICS.Open gsConnect
I get the error "Argument not optional" and the .Open part of gdbPICS.Open gsConnect is high-lighted. Can anyone help me with this?
Public mdbPICS as ADODB.Connection
Public gsConnect as String
Dim lsServer as String * 255
gsConnect = "Provider=sqloledb.1" & _
";PWD=" & gsPASSWORD & _
";UID=" & gsUSER & _
";Initial Catalog=" & gsPICS_DATABASE & _
";Data Source= " & lsServer
Set gdbPICS = New ADODB.Connection
gdbPICS.Open gsConnect
I get the error "Argument not optional" and the .Open part of gdbPICS.Open gsConnect is high-lighted. Can anyone help me with this?