Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    15

    Question Unanswered: connecting to Access via ASP?

    Can someone please help me or point me in the right direction to Building a ASP page that connects to an Access DB on a IIS Server.

    If you have sample page you can send that would be great or share some code - Thank you.


    Scott

  2. #2
    Join Date
    Aug 2003
    Location
    Bologna - Italy
    Posts
    209
    Here it is:

    Code:
    	Dim Database
    	Dim Cursor
    	Dim Source
    
    	Set Database = Server.CreateObject("ADODB.Connection")
    	Set Cursor = Server.CreateObject("ADODB.Recordset")
    
    	Source = Server.MapPath ("data/auto.mdb")
    	
    	Database.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Source
    
    	Cursor.Open "AutoO", Database, , , adCmdTable
    and then you'll have to use the recordset methods on the object Cursor to move through the table AutoO in the database DATA/AUTO.MDB...

    Bye!
    The only failure is not trying to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •