Any VB Programmers on?

Discussion in 'OT Technology' started by 2DR Vette, Jan 3, 2003.

Thread Status:
Not open for further replies.
  1. 2DR Vette

    2DR Vette We don't freestyle the Eyes of Texas, Big Boy.

    Feb 9, 2001
    Likes Received:
    Eastern Seaboard Fission Authority
    Any of you guys ever use ADO and Access? WIll the two work together? I can't get a valid fucking connection string- it keeps crapping ou ton me. :mad:

    Here's what I've got:

    Dim Cnxn As ADODB.Connection
    Dim rstStock As ADODB.Recordset
    Dim strCnxn As String
    Dim strSQLStock As String
    Dim varDate As Variant
    ' Open connection
    [color=red]strCnxn = "Provider='CompuStock Test'"[/color]
    Set Cnxn = New ADODB.Connection
    [color=yellow]Cnxn.Open strCnxn[/color]
        ' Open Stock table
        Set rstStock = New ADODB.Recordset
        strSQLStock = "Select * from Stock"
        rstStock.Open strSQLStock, Cnxn, adOpenKeyset, adLockOptimistic, adCmdTable
    I'm pretty sure the red line is what's causing me a hassle. THe yellow line is where teh debugger craps out with a "Provider cannot be found. It may not be properly installed" error. I know my ODBC is setup up correctly to point at the Access file..... ARGH!! :mad:

    Anyone kno how I can point this thing at an access database given only the path to the .mdb file? Little help- kenny you out there? VBGOD? Anyone?:o
Thread Status:
Not open for further replies.

Share This Page