From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-08-2012 03:27 PM
I have an existing User DSN SQL Server driver created on an XP machine, my driver listed is sqlsrv32.dll version 2000.85.1132.00. I have created a small program to access the SQL database, read the list of tables and then close the connection; it does that just fine. When I assemble the program and run it on a machine that has Win 7 (sqlsrv32.dll version 6.01.7600.16385) I get an error that it can not open the SQL database.
When I created the new User DSN on the Win 7 machine, it showed that the connection is good and past the test.
Program created using LV 2011.
Thank you inadvance for any assistance!
10-08-2012 04:58 PM
I found another post that resolves the issue, where they talk about using the C:\windows\syswow64\odbcad32.exe file that is 32 bit. Which is great, but I cannot find the sysWOW64 folder on that win 7 machine!
10-09-2012 05:21 PM
Hi Chas,
Can you please post the url of the other post you found? This may help us understand your issue.
Thank you!
Regards,
Dayna P.
Applications Engineer
National Instruments
10-10-2012 09:05 AM
Hi Dayna,
http://forums.ni.com/t5/LabVIEW/MySQL-Connection-Error/m-p/2180266
Although, upon further reading this whole thing with the folder c:\windows\SysWOW64\odbcad32.exe; I am finding that this folder is supposed to be already installed on a Win 7 machine. Been finding this on other non-NI message boards, do you know if this is true or not??
10-11-2012 04:52 PM
Hi Chas,
It is true that the folder you referred to is not installed on a Windows 7 machine. This requires that you download the database software.
Regards,
Dayna P.
Applications Engineer
National Instruments
10-12-2012 08:40 AM
What is weird, is I have been looking at other Windows 7 machines and they have the folder in question. None of those perform any database activities, i.e. my personal pc at home had the folder.
08-19-2015 01:37 PM
[I know this is an old thread, but this may help someone else]
The SysWOW64 folder is only present on 64-bit installations of Windows.
The issue (in short; see the link mentioned above for more) is that LabView only accesses SQL using 32-bit libraries, which requires a 32-bit ODBC definition. On 32-bit Windows, that's all there is, so no problem. On 64-bit Windows, the default ODBC configuration tools configure a 64-bit ODBC definition.
Since you don't have SysWOW64, you are (hopefully) running on 32-bit Windows, so that shouldn't be the issue. I recommend avoiding User DSN, and use System DSN instead. Only the Windows Login you used to create the User DSN will have access to it (could be the issue here). There is also a risk there are more than one DSN by the same name. Knowing the exact message from the error might help. You can probably tell if the DSN is missing or inaccessible vs. just not working. Sometimes, you have to pass a password to the Open DB, even though you include one in a DSN. The error message should pinpoint that, too.
08-24-2015 09:23 AM
Even easier is to use a connection string instead!
08-24-2015 09:32 AM
Very true (regarding using a connection string).
I had a very hard time finding documentation on that, though. The simple trick is to use LabView to create a .udl file. The tool is on most LabView windows, in the menu item 'Tools'/'Create Data Link...' (toward the bottom). The wizard is similar to ODBC. Then, open the .udl file with notepad (it's a simple text file), and copy & paste that as the 'connection information' input to DB Tools Open Connection.vi (it will automatically switch to a string input instead of path).
08-24-2015 10:29 AM - edited 08-24-2015 10:30 AM
Google ("odbc connection string") is your friend: https://www.connectionstrings.com
Look up the ODBC connection string for your database engine and away you go! I think you can actually open the .udl files in notepad perhaps?