Results 1 to 5 of 5

Thread: Can't connect to Access

  1. #1

    Thread Starter
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565

    Angry

    I can't believe I'm asking this as I've done it hundreds of times in the past, but I can't get it right now.

    I've created a Data Source for an Access DB situated in c:\Temp.

    All I'm trying to do is open the database with DAO, and it is just not happening. I keep getting error no. 3423.

    Code:
      Set DB = DBEngine.Workspaces(0).OpenDatabase("PassThroughTest", dbDriverNoPrompt, False, "ODBC;DATABASE=;UID=;PWD=;DSN=PassThroughTest")
    I've tried various different connect strings (I just choose to post this one as it is the last one I tried).

    Can anybody tell me what is wrong before I go crazy.

    [Edited by Stevie on 09-28-2000 at 02:29 AM]
    VB6 sp5, SQL Server 2000, C#

    There are no stupid questions. Only stupid people.

  2. #2
    New Member
    Join Date
    Sep 2000
    Posts
    1
    Hi

    I can't make it work you way either. I'm doing it by declaring the workspace before declaring the database. Like this:

    Set dbWorkspace = DBEngine.Workspaces(0)
    Set dbDatabase = dbWorkspace.OpenDatabase(Stuff that goes here)

    This works!

    Regards
    knico

  3. #3

    Thread Starter
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    Already tried that, doesn't work.

    Cheers anyway.
    VB6 sp5, SQL Server 2000, C#

    There are no stupid questions. Only stupid people.

  4. #4
    Junior Member
    Join Date
    Apr 2000
    Posts
    29
    Set db1 = OpenDatabase("k:\estimate\liz\branchre\bmo\data\bmo")
    Set rs1 = db1.OpenRecordset("customers")

    should open your database file with a table called customer.

    B. Servello




  5. #5

    Thread Starter
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    Cheers, but no good to me I'm afraid, as I need to run pass-through queries, so as far as I understand I need to connect through ODBC to do this.
    VB6 sp5, SQL Server 2000, C#

    There are no stupid questions. Only stupid people.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width