0

I am writing an application to interface with a Progress DataBase in VB.net. My development machine is a 32bit Win 7 computer. I have a System DSN configured for the database that I need to use. Since it's on a 32 bit machine its a 32 bit DSN.

App works great on my local computer, the problem arises when I try to take it to one of our 64 bit machines. Now the 64 bit machines seem to have the 32 bit driver installed on them (I opened C:\Windows\SysWow64\odbcad32.exe which, based on research, should show my all 32 bit System DSNs and all User DSNs) and a seemingly same DSN (named the same way and everything) exists in System DSNs.

I tried compiling for x86 instead of AllCPUs, but I still get errors. Some of the errors are below.

Any suggestions on how to fix this so that it runs on both 64 and 32 bit machines? Is there a way to make double sure that the 64 bit machines are working on the 32 bit DSNs?

My understanding of Error [IM014] is that the program is finding the DSN on the 64 bit machine, but cant use it, because it's a 32 bit DSN.

Most of the errors for the second error are on here All the 08S01's are "Communication Link Failures", the IM006 is "Driver's SQLSetConnectOption failed" and apparently HY000 has about 20 different meanings.

DSN Connection String, Target CPU: AllCPUs, 32 Bit Machine : Runs Fine
DSN Connection String, Target CPU: AllCPUs, 64 Bit Machine : Error [IM014]
DSN Connection String, Target CPU: x86    , 32 Bit Machine : Runs Fine
DSN Connection String, Target CPU: x86    , 64 Bit Machine : Error [HY000]
                                                                   [HYC00]
                                                                   [08S01]
                                                                   [08S01]
                                                                   [08S01]
                                                                   [IM006]
'Yes all of those errors on the last one are from one connection attempt.

PsychoData
  • 1,198
  • 16
  • 32
  • Have you looked up those error codes? The fact that you get different codes on the 64-bit system depending on whether the app is 32-bit or 64-bit suggests that the actual issue may be different. – jmcilhinney Mar 25 '14 at 22:11
  • Yes I've looked up the errors. and what might it suggest then? My connection string couldn't be much simpler. `DSN=blackring;uid=demo;pwd=demo` all the ports and other things are set in the DSNs and when I click Test connection they work fine. – PsychoData Mar 25 '14 at 22:43
  • It's also about DSNs and usage of DSNs in connection strings. If you consider all the database vendors a third party product, then oracle, Mssql, mysql, PostGres and all the rest would be off topic as well. – PsychoData Mar 25 '14 at 23:15
  • If it helps, even accessing direct through drivers instead of DSNs works on the 32 bit dev machine but not on the 64 bit machines – PsychoData Mar 25 '14 at 23:16
  • @HansPassant after some looking again I found a progress tag. and I'm guessing that your comment with the exact text of the close vote is the one that is pertinent – PsychoData Mar 25 '14 at 23:53
  • This may be a longshot but have you downloaded the latest 64 bit drivers for your database? Are you attempting to use the 32 bit drivers on a 64 bit machine? – Adam Zuckerman Mar 26 '14 at 05:54
  • Have you checked the Progress Knowledgebase? There seems to be some matching entries. For example this one: http://knowledgebase.progress.com/articles/Article/P169801?q=IM014&l=en_US&fs=Search&pn=1 – Jensd Mar 26 '14 at 06:10
  • @Jensd I've checked into that. The DSN on the 64 bit machines is a 32 bit DSN. 32 bit DSN 32 bit executable. I dont know about the drivers (installed years ago before I was here) but the 32 bit DSN test connection in the ODBC data source manager (32 bit version in Syswow64) thing tests the connection as fine – PsychoData Mar 26 '14 at 12:25

2 Answers2

1

See these links:

https://www.simple-talk.com/sql/database-administration/getting-data-between-excel-and-sql-server-using-odbc--/

http://social.msdn.microsoft.com/Forums/en-US/abf34eea-1029-429a-b88e-4671bffcee76/why-cant-32-and-64-bit-access-database-engine-aceoledb-dataproviders-coexist

Microsoft allows either 32 or 64 bit drivers. If you have office32 then you have the 32 bit driver. The second link shows a work around of sorts.

Regards

Ignacio

Ignacio
  • 64
  • 1
  • 3
0

I fixed this issue by compiling my vb.net code in Target CPU = x64 in the Commpile option of Visual Studio 2019.Works perfect now.