How to get data from Access Database in Intranet

B

Bill Li

Hello all,

I can build the connection to the Access Database in our
intranet via ADO as following:

Provider=ADsDSOObject;
Password="";
User ID=Admin;
Encrypt Password=False;
Data Source=Watchdog_Monitor.mdb;
Location=http://prv.siltronic.com/AW-O/AW-L/Tools/

However, when I try to run query to select data from the
database, the run time error appears

Run-time error '-2147217900 (80040e14)';
One or mor errors occurred during processing of command.

Could anybody tell me what's the error and how to fix it?
Thanks a lot!

Best Regards

Bill
 
M

Matthew Connor

Bill said:
I can build the connection to the Access Database in our
intranet via ADO as following:
However, when I try to run query to select data from the
database, the run time error appears

Run-time error '-2147217900 (80040e14)';
One or mor errors occurred during processing of command.

Could anybody tell me what's the error and how to fix it?
Thanks a lot!

Briefly, ADO is raising an error back to your code.

ADO actually keeps a separate collection of all errors it encountered
and passes that entire collection back (through the connection
object). You program notices that collection and raises it own error
with a not-so descriptive message "One or more errors occurred".

What you can do to trace the errors -

1. When the program crashes, view the connection object in the Watch
window - drill down to Errors - Item 1, Item 2 - Description

2. Trap the error. Add:
On Error Goto AdoErrorReport
(just above error causing line)

On Error Goto 0
(just below error causing line)

Exit Sub
Dim adoErr As ADODB.Error
For Each adoErr In objConn.Errors
msgbox err.Description
Next
(just above 'End Sub' - (changing objConn to you connection object))


With all of the ease of debugging to which I've become accustomed, I
know I've been frustrated by this at times.


Hope this helps,

Matthew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top