Takes ages to connect to database

Takes ages to connect to database

am 03.11.2004 16:54:57 von Greg

Hi, me again!

I'm using the following to connect to an MS Access database, and putting
Response.Write(Now()) around it. Sometimes it will connect quickly, but
other times it takes up to 20 seconds to connect. Any ideas?

conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\inetpub\clients\awt326\db\db127\store.mdb"
set con = Server.CreateObject("ADODB.Connection")
con.open(conString)

Many thanks,
Greg

Re: Takes ages to connect to database

am 03.11.2004 17:06:51 von ten.xoc

> I'm using the following to connect to an MS Access database, and putting
> Response.Write(Now()) around it. Sometimes it will connect quickly, but
> other times it takes up to 20 seconds to connect. Any ideas?

Stop using Access?

Are you sure you are closing your connection(s) at the bottom of the page?

Also try dropping the server. prefix, see http://www.aspfaq.com/2336

set conn = CreateObject("ADODB.Connection")