MS Access connection using ODBC from NAV 2009 R2 RTC
                
                    Gabry                
                
                    Member Posts: 48                
            
                        
            
                    I got successully the connection to an Access DB using ODBC provider "DSN user" using "Microsoft Access Driver (*.mdb)" driver (version 4.006305.00, ODBCJT32.DLL) on a Windows XP Professional 32-bit Platform as shown in the code below:
I moved exactly the same code on a Windows Server 2012 64-bit Platform using the same ODBC provider "DSN user" using "Microsoft Access Driver (*.mdb)", but with a more recent driver version (6.00).
Running the same code, it occurs the following error (see the attached picture to look at whole error message):
"The call to member Open failed: error [hy000] [Microsoft] [odbc microsoft access driver] Disk or network error"
I have already checked permissions on the database folder (now is locally to the client).
Please do you have any ideas how to solve this problem?
                
SQLConnectionString := 'C:\AF\DecryptDatabase.mdb'; ODBCConnection := ODBCConnection.OdbcConnection(SQLConnectionString); ODBCConnection.Open(); ODBCCommand := ODBCConnection.CreateCommand(); ODBCCommand.CommandText := 'select * from tablename'; ODBCReader := ODBCCommand.ExecuteReader();
I moved exactly the same code on a Windows Server 2012 64-bit Platform using the same ODBC provider "DSN user" using "Microsoft Access Driver (*.mdb)", but with a more recent driver version (6.00).
Running the same code, it occurs the following error (see the attached picture to look at whole error message):
"The call to member Open failed: error [hy000] [Microsoft] [odbc microsoft access driver] Disk or network error"
I have already checked permissions on the database folder (now is locally to the client).
Please do you have any ideas how to solve this problem?
0                
            Comments
- 
            The database is on client, but your code is run on middle tier. That why it fails i think.0
 - 
            ppavuk wrote:The database is on client, but your code is run on middle tier. That why it fails i think.
Sorry maybe that is not why it fails because I tried to allocate the same database in different machine using the LAN (changing the connection string, e.g. \\client1\databasefolder\database.mdf) and it work perfectly in the right environment. I suppose that it is different problem.
Please do you have any other insights?
Thank you0 - 
            Maybe there is some problems with x64 ODBC provider. RTC client still 32 bit...
No better ideas...0 - 
            I don't know if this is helpful but I had a 64 bit machine and finally got my odbc to work but I had to access the 32bit administrator tool instread of the 64 bit to get it work work properly.
http://support.microsoft.com/kb/942976
Odbcad32.exe0 
Categories
- All Categories
 - 73 General
 - 73 Announcements
 - 66.6K Microsoft Dynamics NAV
 - 18.7K NAV Three Tier
 - 38.4K NAV/Navision Classic Client
 - 3.6K Navision Attain
 - 2.4K Navision Financials
 - 116 Navision DOS
 - 851 Navision e-Commerce
 - 1K NAV Tips & Tricks
 - 772 NAV Dutch speaking only
 - 617 NAV Courses, Exams & Certification
 - 2K Microsoft Dynamics-Other
 - 1.5K Dynamics AX
 - 323 Dynamics CRM
 - 111 Dynamics GP
 - 10 Dynamics SL
 - 1.5K Other
 - 990 SQL General
 - 383 SQL Performance
 - 34 SQL Tips & Tricks
 - 35 Design Patterns (General & Best Practices)
 - 1 Architectural Patterns
 - 10 Design Patterns
 - 5 Implementation Patterns
 - 53 3rd Party Products, Services & Events
 - 1.6K General
 - 1.1K General Chat
 - 1.6K Website
 - 83 Testing
 - 1.2K Download section
 - 23 How Tos section
 - 252 Feedback
 - 12 NAV TechDays 2013 Sessions
 - 13 NAV TechDays 2012 Sessions