post your comment   print   send to a friend
Rate:   0% | Views: 992
Question categories:  NT Plans

Can i use microsoft access databases in conjunction with asp on aplus.net?

Answer by: George Kaloyanov, Aplus.Net Knowledge Base Support.

With Aplus.Net’s Windows 2003 hosting server plans of Personal Windows, Business Class Windows, Pro Windows and eCommerce Windows, you can use ASP to read/write to databases via an ODBC connection. You can use both DSN or DSN-less connections.

Microsoft Access and Microsoft SQL server are the two most commonly used database types on a Windows Hosting Platform, both of which are available with the following Aplus.Net Windows-based shared hosting plans:

  • Microsoft Access: Personal Windows, Business Class Windows, Pro Windows, and eCommerce Windows.
  • Microsoft SQL 2000: Business Class Windows (50 MB), Pro Windows (150 MB) and eCommerce Windows (350 MB).

Note: Please upload all you Microsoft access database files (.mdb files) in your DB folder.

Here is an ASP script example which illustrates how to establish a DSN-less connection to a Microsoft Access (.mdb) database:

Note: Please note that the example below assumes your MS Access database file is named mydb.mdb and is uploaded into your DB folder. Please update the path to your MS Access database in the connection string with your plan's specific details (i.e: ftpusername, folder and database file name)

    <html>
    <head>
    <title>An ASP Test Page</title>
    </head>
    <body bgcolor="white" text="black">
    <%
        'Dimension variables
        Dim adoCon 'Holds the Database Connection Object

        Dim rsproduct 'Holds the recordset for the records in the database

        Dim strSQL 'Holds the SQL query to query the database

        'Create an ADO connection object
        Set adoCon = Server.CreateObject("ADODB.Connection")

        'Set an active connection to the Connection object using a DSN-less connection
        adoCon.Open "Driver={Microsoft Access Driver (*.mdb)};" & "DBQ=d:\inetpub\virtual\yourusername\db\mydb.mdb;" 

        if adoCon.state = 1 then
            Response.write ("Database Connection Established Successfully")
        end if

        adoCon.Close
    %>


</body>
</html>

Customer Feedback
Rate:   0% | Views: 992 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Server Hosting | Hosting Service    Back to serch results
Browse the Base
Knowledge Base
Shared Hosting
  NT Plans
Messages
 

$75 Free Google AdWords

Free $75 Google AdWords when you sign up for WebImage! Target by location, create your own, or let Google create your ads for you. Check out http://www.aplus.net/google.html to see how AdWords works for you.

Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. How do I access the SQL Server that comes with my Windows hosting plan?
 
2. Some of the asp pages in my site use ASPEmail or CDONTS mail components but they don't work.
 
3. How do I enable SQL on my Windows plan using Aplus.Net web Control Panel?
 
4. What do i need to do to get an ASP.NET project to work?
 
5. How do I enable Microsoft Indexing?
 
Related Articles
 

Web Hosting Features.

Dedicated Web Server Checklist.

Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest