Announcement

Collapse
No announcement yet.

MS Access connectivity from ASP Code - How to connect MS Access Database with ASP?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • shikha
    replied
    Re: MS Access connectivity from ASP Code - How to connect MS Access Database with ASP

    Hello

    Thanks for the connectivity code. if i get any problem i really consult with you.

    thanks

    Leave a comment:


  • Shane
    replied
    Re: MS Access connectivity from ASP Code - How to connect MS Access Database with ASP

    In order to connect with MS Access database from ASP one can use below mentioned code:

    Dim strConn
    Set strConn = Server.CreateObject("ADODB.Connection")
    strConn.ConnectionString = "DSN=test"
    strConn.Open
    Response.Write "Access Connection Successful"

    This connection is DSN Based connection. For that one need to setup DSN either from the server or control panel.
    Last edited by admin; 08-21-2015, 04:50 AM.

    Leave a comment:


  • MS Access connectivity from ASP Code - How to connect MS Access Database with ASP?

    In order to connect with MS Access database from ASP one need to use below mentioned code:

    Dim strConn
    Set strConn = Server.CreateObject("ADODB.Connection")
    strConn="DRIVER={Microsoft Access Driver (*.mdb)}; "

    strConn=strConn & "DBQ=" & Server.mappath("db/mydb.mdb")
    -OR-
    strConn=strConn & "DBQ=C:\domains\mydomain.com\db\mydb.db"

    One can use any connection path as they are either absolute or relative. This connection is a DSN Less connection.
    Last edited by admin; 08-21-2015, 04:49 AM.
Working...
X

Sign up for a News Letter Click here to sign up