RE: Wondering why the following ADO connection to Access isn't working
From: K Dales (KDales_at_discussions.microsoft.com)
Date: 02/09/05
- Next message: Gixxer_J_97: "Re: algorithm creation"
- Previous message: Tom Ogilvy: "Re: Re-formulating the problem: Dynamic Button Names!"
- In reply to: troy_at_sigwing.net: "Wondering why the following ADO connection to Access isn't working..."
- Next in thread: troy_at_sigwing.net: "Re: Wondering why the following ADO connection to Access isn't working"
- Reply: troy_at_sigwing.net: "Re: Wondering why the following ADO connection to Access isn't working"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Feb 2005 10:25:05 -0800
When does it fail and what error message are you getting?
Checking the obvious first, are you sure you want the space before the
period in \Work Log .mdb? And I assume that before you use your ADO
variables you are 'Set'ing them (e.g. Set MYdb as New ADODB.Connection)?
Some general troubleshooting guidelines I use with ADO:
- Put breaks or messageboxes in the code at critical points: here that would
be just after making the connection and just after returning the recordset.
Use the Immediate pane and/or locals window to see what is going on with your
ADO objects. Try manually typing in the Open commands, changing some of the
parameters.
- Make sure you have the connection string correct. One trick I use
sometimes is to use MSQuery to set up a simple external data query off the
same DB and then look at the connection string from that (which I can see by
the querytable.connection property).
Sorry can't be of more assistance without more info.
"troy@sigwing.net" wrote:
> Dim MYdb As ADODB.Connection
> Dim MYrs As ADODB.Recordset
>
> MYdb.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents
> and Settings\tsigwin\Desktop\Work Log .mdb;USER ID=admin;Password=;"
> MYrs.Open "Select * from Work Log.Work Log", MYdb, adOpenDynamic,
> adLockOptimistic
>
>
>
> Any ideas?
>
>
- Next message: Gixxer_J_97: "Re: algorithm creation"
- Previous message: Tom Ogilvy: "Re: Re-formulating the problem: Dynamic Button Names!"
- In reply to: troy_at_sigwing.net: "Wondering why the following ADO connection to Access isn't working..."
- Next in thread: troy_at_sigwing.net: "Re: Wondering why the following ADO connection to Access isn't working"
- Reply: troy_at_sigwing.net: "Re: Wondering why the following ADO connection to Access isn't working"
- Messages sorted by: [ date ] [ thread ]