Results 1 to 3 of 3

Thread: Beginner. connect to an Access DB on server

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    North East America
    Posts
    463

    Beginner. connect to an Access DB on server

    OK I am a beginner to this ASP stuff. I have tried more than a hand full of tutorials (all to long and confussing) on connecting to a db on a server using ASP pages and all I get is ODBC errors and stuff like that. Can anyone tell me how I can connect to the DB using HTML and ASP? I set my IIS to except Scripting and wirting to the directory.

    I want to start off just connecting and looking at one field then once I get that down I will add more fields and add writing to them but for now I just want to connect. My db name is (Action RequestCon.mdb) and the table I want to look at is Userinfo an the field is Name. Any help would be greatly appreciated

    -Troy
    TMacPherson
    MIS Systems Engineer
    [email protected]


  2. #2
    Addicted Member
    Join Date
    Oct 2001
    Posts
    150
    <code>
    dim dbConn

    strSQL = "SELECT * FROM "Name of table"

    Set dbConn = Server.CreateObject("ADODB.Connection")

    SET rsOptions = Server.CreateObject ("ADODB.Recordset")

    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=c:\Action RequestCon.mdb"
    dbConn.Open strConnect
    rsOptions.Open strSQL, dbConn
    </code>

    Hope this helps

  3. #3
    Addicted Member
    Join Date
    Oct 2001
    Posts
    150
    To be more specific on this line just type

    strSQL = "SELECT * FROM Userinfo where name=" Whatever

Posting Permissions

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



Click Here to Expand Forum to Full Width