How to get data from Access Database in Intranet
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 |
How to get data from Access Database in Intranet
Bill Li wrote:
I can build the connection to the Access Database in our intranet via ADO as following: <snip 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 |
All times are GMT +1. The time now is 11:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com