Discussion:
64-bit SQL Server ODBC Connection
Joshua Hunter
2013-10-22 15:50:47 UTC
Permalink
We can't get the following setup to work. Is anyone doing this and know what to do?

MS SQL Server 2012, 64-bit
4Dv13.3 32-bit
4D v13 64-bit ODBC driver
Windows 7 64-bit

We are trying to get MS SQL Server to query our 4D app. I am able to query it with other applications using the 32-bit driver. I've setup a linked server, but my queries fail. The linked server is setup to use Microsoft OLE DB Provider for ODBC Drivers with a sytem DSN to my app. The test connection works both in MS SQL and in the ODBC admin utility. I have the security setup to use a single user for all connections. Changing this user or removing them entirely causes the tests to fail. So correct username and password are in place.

A simple query like "SELECT * FROM MyLinkedServer...Users;" returns
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_COLUMNS" for OLE DB provider "MSDASQL" for linked server " MyLinkedServer ". The provider supports the interface, but returns a failure code when it is used.

If I enable OpenQuery in the 4D driver settings and then use the openQuery technique I get different errors, but the results tab does fill the field names.

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "MyLinkedServer" reported an error. Access denied.
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "MSDASQL" for linked server " MyLinkedServer ".

And of course, using the 32-bit driver causes failures immediately within SQL server because of the architecture mismatch.

Any help is much appreciated,

Joshua

Joshua Hunter
joshua-Ni5i+***@public.gmane.org<mailto:joshua-Ni5i+***@public.gmane.org>
(425) 673-1974
www.dwdev.com<http://www.dwdev.com/>
Dataworks Development, Inc.
Providing secure and configurable data management solutions for research and clinical labs since 1987.



**********************************************************************
4D v13 is available now - with more than 200 new features to make
your applications richer and faster
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe-d2/MUvgItPNWk0Htik3J/***@public.gmane.org
**********************************************************************
John Salow
2013-10-22 19:26:00 UTC
Permalink
The 64 bit odbc driver is for use with 64 bit 4d server. You need 32 bit odbc driver to communicate with 4d 32 bit. You can use the 32 bit odbc from a 64 bit system, just have to set odbc up from syswow directory. Not a 100% sure from sql 64 bit to 4d 32 bit.

-----Original Message-----
From: 4d_tech-bounces-d2/MUvgItPNWk0Htik3J/***@public.gmane.org [mailto:4d_tech-bounces-d2/MUvgItPNWk0Htik3J/***@public.gmane.org] On Behalf Of Joshua Hunter
Sent: Tuesday, October 22, 2013 8:51 AM
To: 4D iNug Technical (4d_tech-d2/MUvgItPNWk0Htik3J/***@public.gmane.org)
Subject: 64-bit SQL Server ODBC Connection

We can't get the following setup to work. Is anyone doing this and know what to do?

MS SQL Server 2012, 64-bit
4Dv13.3 32-bit
4D v13 64-bit ODBC driver
Windows 7 64-bit

We are trying to get MS SQL Server to query our 4D app. I am able to query it with other applications using the 32-bit driver. I've setup a linked server, but my queries fail. The linked server is setup to use Microsoft OLE DB Provider for ODBC Drivers with a sytem DSN to my app. The test connection works both in MS SQL and in the ODBC admin utility. I have the security setup to use a single user for all connections. Changing this user or removing them entirely causes the tests to fail. So correct username and password are in place.

A simple query like "SELECT * FROM MyLinkedServer...Users;" returns
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_COLUMNS" for OLE DB provider "MSDASQL" for linked server " MyLinkedServer ". The provider supports the interface, but returns a failure code when it is used.

If I enable OpenQuery in the 4D driver settings and then use the openQuery technique I get different errors, but the results tab does fill the field names.

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "MyLinkedServer" reported an error. Access denied.
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "MSDASQL" for linked server " MyLinkedServer ".

And of course, using the 32-bit driver causes failures immediately within SQL server because of the architecture mismatch.

Any help is much appreciated,

Joshua

Joshua Hunter
joshua-Ni5i+***@public.gmane.org<mailto:joshua-Ni5i+***@public.gmane.org>
(425) 673-1974
www.dwdev.com<http://www.dwdev.com/>
Dataworks Development, Inc.
Providing secure and configurable data management solutions for research and clinical labs since 1987.



**********************************************************************
4D v13 is available now - with more than 200 new features to make
your applications richer and faster
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe-d2/MUvgItPNWk0Htik3J/***@public.gmane.org
**********************************************************************

**********************************************************************
4D v13 is available now - with more than 200 new features to make
your applications richer and faster
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4D_Tech-Unsubscribe-d2/MUvgItPNWk0Htik3J/***@public.gmane.org
**********************************************************************
Joshua Fletcher
2013-10-22 19:31:11 UTC
Permalink
Sorry, this isn't correct. The 64-bit ODBC driver is for 64-bit
*clients*, not server. The driver gets installed on the client machine.
The server doesn't really care. The driver architecture needs to match
the client architecture:

http://kb.4d.com/assetid=76874


-Josh
--
Josh Fletcher
Technical Account Manager
4D, Inc.
Post by John Salow
The 64 bit odbc driver is for use with 64 bit 4d server. You need 32 bit
odbc driver to communicate with 4d 32 bit. You can use the 32 bit odbc
from a 64 bit system, just have to set odbc up from syswow directory. Not
a 100% sure from sql 64 bit to 4d 32 bit.
Loading...