• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to Register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

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?

    WordPress Hosting on SSD Servers
    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, 05: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.
    Last edited by admin; 08-21-2015, 05:50 AM.

    Comment


    • #3
      ASP.Net Hosting starts @ $3.18/Mo.
      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

      Sign up for a News Letter Click here to sign up