I have a test environment with a Linux Ubuntu 16.04 'server', running MS SQL Server 17, where the company database is hosted. My client machine is a Windows 7 machine.
- I have managed to import the database into the Linux server, and am able to create and successfully test an ODBC connection from the Windows client.
- SQL Server Management Studio on the Windows PC is able to create/drop tables, create users, objects and so forth on the SQL Server instance on Linux.
I am connecting as follows in VB 6.0
Dim rec1 As ADODB.Recordset
Set rec1 = New ADODB.Recordset
rec1.Open "Select * from tblSysReg", gstrDefaultDB, adOpenDynamic, adLockOptimistic
- gstrDefaultDB is the string containing the name of the ODBC registered and tested connection.
- The connection test credentials are: system administrator (sa) and password.
- The connection is set to use SQL Server Authentication
This is where the error is generated as follows:
- automation error code -2147217843
However, when I run the software program from the Windows client, it is unable to 'read' from a database table (tblSysReg) and generates an automation error.
The successfull ODBC connection parameters are as follows:
- Type: TCP/IP
- Server: 10.0.0.3
- Port: 1433
I am logging in as 'sa' with my SQL Server password for SQL Server on Linux.
I am battling to understand how the connection test is successful, bit the program using the connection cannot read from any tables in the SQL Server database on Linux?
Thank you in advance.