MSAcess DB access

MSAcess DB access

I would recommend that you import your MS-Access database into a sole MSSQL database (as MS-Access is now considered obsolete anyway) you can use any of the following ways;

http://www.packtpub.com/article/transferring-data-ms-access-2003-to-sql-server-2008

http://technet.microsoft.com/en-us/library/cc917601.aspx

SQL Server Migration Assistant http://cfpayne.wordpress.com/2006/07/23/how-to-import-microsoft-access-into-sql-server-2005/

 

Furthermore for the ODBC MS-Access connection string, please use ADODB or Microsoft.Jet.OLEDB instead to connect to your MS-Access database; using the following KB article.

 

 

Please use the following sample code to connect to a MS Access .mdb file; you can goto Your Hsphere account from the Databases link on your home-page Click on ODBC  Enable it first > then make sure you select MS Access DB *.mdb and click on Upward Looking Icon infront of it and create a DSN from next Page.

 

<%

Dim ConnectionString

ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" &_

"DBQ=D:\hshome\username\site.com\path\to\file.mdb;DefaultDir=;UID=;PWD=;"

 

Dim Connection

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

 

Connection.ConnectionTimeout = 30

Connection.CommandTimeout = 80

Connection.Open ConnectionString

%>

 

D:\hshome\username\site.com\path\to\file.mdb;  is where you've uploaded your mdb file and almost always starts off with C:\HostingSpaces\USERNAME where USERNAME is your username.

 

While the above works for many of our older servers. The following works on our newer servers. You'll need to make sure that your application is running in a Dedicated  App Pool (check box under the website inside your control panel) and that MDAC is installed on the server which all of our new servers already have installed (ask our support staff if it doesn't work).

 

<%

Dim ConnectionString

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" &_

"Data Source=D:\hshome\username\site.com\path\to\file.mdb;User Id=;Password=;"

 

Dim Connection

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

 

Connection.ConnectionTimeout = 30

Connection.CommandTimeout = 80

Connection.Open ConnectionString

%>

 

    • Related Articles

    • New Access Management User setup on Linux

      1) Login to your accounts.cartika.com account 2) Select your access management service (customers with managed infrastructure in both the US and CAD will have two) 3) Navigate to Login to SolidCP -> Click Login 4) Click on Users under your Hosted ...
    • New Access Management User setup on Windows 2008 / 2008r2

      In order to manage your GDPR compliant access to Windows 2008 You will need to create  1) Login to your accounts.cartika.com account 2) Select your access management service (customers with managed infrastructure in both the US and CAD will have two) ...
    • How to repair a DB on MySQL

      REPAIR TABLE & Database On MySQL ============================== The REPAIR TABLE method is only applicable to MyISAM, ARCHIVE, and CSV tables. You can use REPAIR TABLE if the table checking operation indicates that there is a corruption or that an ...
    • Uploading DB via phpmyadmin fails

      Unable to import MySQL DataBase via PhpMyAdmin. Symptoms include a hanging screen or time-out errors The cause of this is the DB file is too large to import via phpmyadmin and can only be imported via the command line by a cartikahosting.com ...
    • Set or Change DB Collation

      How to Set or Change the Database Collation using SQL Server Management studio Default MS SQL 2008 collations - http://puu.sh/lJvpI.txt Other collations - http://puu.sh/lJvG0.txt Before proceeding with any changes, first initiate a full backup of ...