PDA

View Full Version : Error while opening database



bostjank
Jul 12th, 2002, 03:49 PM
I have ASP pages for storing information about visitors. I use database in Access.Sometimes, when I try to check a page where I display all information (about 600 records) I get this error message:

Could not open more tables
(sorry, I don't know error code)

Could you tell me how can I correct this?

Thanks,
Bostjan

QuackHead
Jul 12th, 2002, 03:51 PM
can you post your code please?

Then someone will be able to look at your code and help you... sometimes it may just be one line that's messing it up...

~Quack

bostjank
Jul 12th, 2002, 04:00 PM
strconn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("database.mdb")
set conn = server.createobject("adodb.connection")
conn.open strconn

strSQL = "SELECT TOP 50 * FROM tabe1 ORDER BY ID Desc"
set rs = conn.Execute(strSQL)

Do While Not rs.EOF
...

QuackHead
Jul 12th, 2002, 04:26 PM
Ok, thanks, hopefully I can help you here... try using this...

set conn = server.createobject("adodb.connection")
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data source=full_path_to_your_database.mdb"
conn.open

set rs = conn.Execute("SELECT TOP 50 * FROM tabe1 ORDER BY ID Desc")

rs.MoveFirst

Do While Not rs.EOF
...
~Quack