PDA

Click to See Complete Forum and Search --> : Can't connect to Access


Stevie
Sep 28th, 2000, 01:27 AM
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.


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]

knico
Sep 28th, 2000, 02:00 PM
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

Stevie
Sep 29th, 2000, 02:33 AM
Already tried that, doesn't work.

Cheers anyway.

bservello
Sep 29th, 2000, 01:55 PM
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

Stevie
Oct 2nd, 2000, 02:47 AM
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.