|
| |
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
Much ADO about nothing - 3/4/2003 9:58:43
I am trying to use ADO to connect to my database for the first time and I am having some problems. I need to do this because I now need to split my results display into multiple pages and from what I' ve read in this forum, ADO is the way to go. Here is the code I am using, and the error that I am getting follows it: <body> <% set conn=Server.CreateObject(" ADODB.Connection" ) conn.Provider=" Microsoft.Jet.OLEDB.4.0" conn.Open " http://www.mydomain.com/fpdb/muller_recapture.mdb" %> </body> Microsoft JET Database Engine error ' 80004005' Not a valid file name. /recapture/test.asp, line 14
|
|
|
|
rdouglass
Posts: 9228 From: Biddeford, ME USA Status: offline
|
RE: Much ADO about nothing - 3/4/2003 10:48:44
Try this: <% set conn=Server.CreateObject(" ADODB.Connection" ) myDSN=" Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath(" /fpdb/muller_recapture.mdb" ) conn.Open myDSN %>
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Much ADO about nothing - 3/4/2003 11:11:45
Thanks, that found the database, but now I am getting this error: ADODB.Recordset error ' 800a0e7d' Operation is not allowed on an object referencing a closed or invalid connection. Here is the script (the table is " Contacts" ): set rs=Server.CreateObject(" ADODB.recordset" ) rs.Open " Contacts" , conn
|
|
|
|
Doug G
Posts: 1189 Joined: 12/29/2001 From: SoCal Status: offline
|
RE: Much ADO about nothing - 3/4/2003 11:21:22
The error message indicates your db connection isn' t open when you are trying to use it to open your recordset. If your conn.open fails with an error, the connection will remain closed.
_____________________________
====== Doug G ======
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Much ADO about nothing - 3/4/2003 11:24:42
OK. So how do I fix it? I have only connected with a DRW in the past, so all of this is new to me. Please excuse my ignorance.
|
|
|
|
Sandalwood
Posts: 233 Joined: 12/18/2002 From: New Jersey! Status: offline
|
RE: Much ADO about nothing - 3/4/2003 13:33:54
OK, this ADO stuff isn' t going to work. I got it to connect to the database, but I can' t format the results to match the other elements on my page. In addition, I seem to get errors when I include other database result displays on the same page. Are there any alternatives? Thanks.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|