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

  • 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.
    admin
    Administrator
    Last edited by admin; 08-21-2015, 04:49 AM.

  • #2
    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.
    admin
    Administrator
    Last edited by admin; 08-21-2015, 04:50 AM.

    Comment


    • #3
      AccuWeb.Cloud
      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

      Comment

      Working...
      X