Cartika Support Portal

            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

            %>

             

            Updated: 24 Jun 2018 12:24 PM
            Helpful?  
            Help us to make this article better
            0 0