Recommended Posts

Difficulty connecting to an SQL database. I've looked through posts in the forums and tried the suggested tips but still no connectivity. Any help would be most appreciated. Here's where I'm at:

DAQFactory logging set configured as below reports the error: The specified DNS contains an architecture mismatch between the driver and application

Logging method: ODBC database

Data source: OTS_KPIs

Table Name: NewTable

DAQFactory sequence to open database reports the error: O1002 Unable to open ODBC database. I've tried several variations of the OpenEx() call, examples below. None work:

dbase = db.OpenEx("DSN='OTS_KPIs';DATABASE='PEL5453_PEL_OTS'")

dbase = db.OpenEx("SERVER='NEWTHINKPAD\SQL';DSN='OTS_KPIs';UID=;PWD=;DATABASE='PEL5453_PEL_OTS'")

dbase = db.Open("OTS_KPIs")

DAQFactory logging set configured as below reports the error:
The specified DNS contains an architecture mismatch between the driver and application

Logging method: ODBC database

Data source: OTS_KPIs

Table Name: NewTable

DAQFactory sequence to open database reports the error: O1002 Unable to open ODBC database. I've tried several variations of the OpenEx() call, examples below. None work:

dbase = db.OpenEx("DSN='OTS_KPIs';DATABASE='PEL5453_PEL_OTS'")

dbase = db.OpenEx("SERVER='NEWTHINKPAD\SQL';DSN='OTS_KPIs';UID=;PWD=;DATABASE='PEL5453_PEL_OTS'")

dbase = db.Open("OTS_KPIs")

DAQFactory logging set configured as below reports the error: The specified DNS contains an architecture mismatch between the driver and application

Logging method: ODBC database

Data source: OTS_KPIs

Table Name: NewTable

DAQFactory sequence to open database reports the error: O1002 Unable to open ODBC database. I've tried several variations of the OpenEx() call, examples below. None work:

dbase = db.OpenEx("DSN='OTS_KPIs';DATABASE='PEL5453_PEL_OTS'")

dbase = db.OpenEx("SERVER='NEWTHINKPAD\SQL';DSN='OTS_KPIs';UID=;PWD=;DATABASE='PEL5453_PEL_OTS'")

dbase = db.Open("OTS_KPIs")

SQL and ODBC config:

I have MS SQL Server 2012 installed:

Microsoft SQL Server Management Studio 11.0.2100.60

Microsoft Data Access Components (MDAC) 6.1.7601.17514

Microsoft MSXML 3.0 4.0 6.0

Microsoft Internet Explorer 9.0.8112.16421

Microsoft .NET Framework 4.0.30319.296

Operating System 6.1.7601

OS: Windows 7 professional, SP 1. 64-bit.

I have an SQL database set up as follows:

server name: NEWTHINKPAD\SQL

Database: PEP5453_PEL_OTS

Table: Run_KPIs

Following ODBC data source created:

Name: OTS_KPIs

Driver: SQL Server

Authentification: Windows

Database: PEP5453_PEL_OTS

Excel can connect OK to the database. We have our own sofware utility that connects fine to the database.

Link to comment
Share on other sites

This is because you are trying to access a 64 bit ODBC driver from DAQFactory, a 32 bit application. This is a windows issue, and unrelated to DAQFactory. We had the same issue when we updated our azeotech server to 64 bit (and thus IIS became 64 bit) and Access, which apparently doesn't have a 64 bit driver. We had to move to a different database.

That said, MS SQL server probably has both a 32 bit and 64 bit ODBC driver. The trick is getting to it. To add to the confusion, Windows actually has two ODBC control panels, one for 64 bit drivers and one for 32 bit drivers. On Win 7 x64, when you go to the main control panel, you are presented with the 64 bit one. You need to run the 32 bit one which is typically installed in the SysWow64 folder. See this article:

http://support.microsoft.com/kb/942976

Make sure you give your 32 bit and 64 bit DSN's different names or DAQFactory may connect to the wrong one.

Link to comment
Share on other sites

Thanks for that insight. I created a DSN using the 32 bit version of the ODBC administrator tool. Still not connecting, although a different error message this time on the logging set. I guessing SQL is still using the 64 bit ODBC driver.

C1011 Could not create table for logging. Msg: Incorrect syntax near '('.

I'm using the default SQL strings witht he logging set configuration.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.