Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Help, Cannot connect to ODBC database using SQL Toolkit!

$
0
0

Hello All,

 

I am toying around with the SQL Toolkit evaluation (2.2 + the patch) and I am having difficulty.

 

I ran the example program "connect" and it seems to work fine.

 

However, I try to write my own program and I keep getting the same message:

"Function DBConnect: (return value == -10 [0xFFFFFFF6]).

Native error code - 2147467259 0x80004005

 

The message differs from time to time, but the return value is constant.

 

I am using both Microsoft SQL Server 2012 and MySQL.

 

For MySQL I have installed the latest ODBC connector, 5.3.4. Inside the Control Panel/Data Sources(ODBC), I have a DSN named test_mysql in both User DSN and System DSN.

I ran a test on the connection and the test passes. I am not sure if I should use the ansi or unicode driver, I have tried both with the same success.

 

I am not sure I had configured the SQL Server connection properly, and will attempt that again.

 

My CVI Code is simple enough:

 

hdbc = DBConnect ("DSN=test_mysql"); 

 

Every time I get a -10 from DBConnect. Either I have something configured wrong or I am missing something.

 

Does anyone have any suggestions?


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>