Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADODB and VB4

Status
Not open for further replies.

nmtexman

Programmer
Jun 22, 2001
22
0
0
US
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?
 
The only difference I see is a spelling problem. In the PUBLIC section you have "mdbPICS" however, in the code you have "gdbPICS". Maybe you should change the public from [red]'M'[/red] to [red]'G'[/red] since you have "gdbPICS" twice.

Hope this helps some.
--MiggyD

"The world shrinks more and more with every new user online."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top