MSAccess to MSSQL

MSAccess to MSSQL

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

    • MSSQL Admin Tools

      I would like to manage my MSSQL database. How can I do this? On some of our MSSQL servers we have installed a tool called MyLittleAdmin. This web application allows you to edit your database, back it up and restore it from a backup (MSSQL 2005 & 2008 ...
    • MSSQL Redirect Module

      Cartika has introduced an MSSQL redirect module available for all Reseller customers (including UR customers, VDC, VPS and Cloud customers with MSSQL enabled) This module can be found under E.Manager > 3rd party Tools > CPDevel in your reseller ...
    • Shrink mssql db with mylittleadmin

      How to truncate mssql logfiles using mylittleadmin: 1) login into mylittleadmin 2) Select the Tools option 3) Under Tools click on : Shrink Database 4) Select your database 5) Under the option “Currently allocated space”, change the value with a ...
    • Shrink mssql db with mylittleadmin

      How to truncate mssql logfiles using mylittleadmin: 1) login into mylittleadmin 2) Select the Tools option 3) Under Tools click on : Shrink Database 4) Select your database 5) Under the option “Currently allocated space”, change the value with a ...
    • Restoring MSSQL Databases Shared/Reseller Hosting

      All shared/reseller MSSQL enabled servers come standard with a web based mylittleadmin utility.  However, this utility does not allow for importing databases (only working with databases once they have been imported) Since we cannot allow MSSQL ports ...