Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Using ADODB!


Message #1 by "pavan jegrum" <sonair68@h...> on Wed, 13 Nov 2002 23:00:13
hi,
       I have started learning ASP like a week ago. I have a very basic 
question?How long does it take to connect to a Access 2000 database using 
OLEDB "Microsoft.Jet.OLEDB.4.0"?I was trying to connect to a (mdb) 
database file,but it was taking ever to open up the ASP page.The code is 
shown below:

       Dim objCon,ObjRS,intRecordCount,counter
   Set objCon= Server.CreateObject("ADODB.Connection")
   Set objRS= Server.CreateObject("ADODB.Recordset")
   objCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
              "Data Source=C:\Movie2000.mdb;" & _
              "Persist Security Info=False"
  objRS.Open "Movies", objCon,adOpenForwardOnly,adLockReadOnly,adCmdTable
  intRecordCount=objRS.RecordCount

  For counter= 1 to 5
  Response.Write objRS("Title") & "<BR>"
  objRS.MoveNext
  Next

  objRS.Close
  objCon.Close
  Set objRS=Nothing
  Set objCon=Nothing

The otherday after like 30 minutes i get a 500.100 eror saying asp script 
was timed out.have to set the timeout property. Am I missing something?
Does hard drive space has to do anything with it?I have almost 2gb free 
space. I would appreciate if my someone can help me here?

 Thanks
 pavan.

  Return to Index