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.
12-03-2014 11:39 AM
I wrote a program in labview 2014 32 bit to pull data from a MS SQL Server database. I used the 32bit ODBC datasource program to generate a DSN file. The code works just fine when I run the VI from labview, but when I build the program and run the executable, I get an error:
ADO Error: 0x80004005 Exception occured in Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. in NI_Database_API.lvlib:DB Tools Open Connec (String).vi->RecipeSelect.vi
I created a UDL file with the labview "Create data link" tool and I still get the same error even though the VI runs fine. I have also tried a connection string. All the searches I have done on this error suggest a problem between 64bit and 32bit data sources. I've tried creating them both ways and still get the same error, yet the VI always runs fine on the same computer from labview.
Any suggestions on what to try next? Thanks in advance.
Solved! Go to Solution.
12-04-2014 06:46 PM
Hello JeffPaluck,
Are you running the executable as an administrator? Also just to clarify, are you running this executable on your development machine or on a different computer when you receive the error?
Jonathan
12-04-2014 06:55 PM
I'm not running the executable as administrator. I tried just now and it still failed to work. I'm receiving the error on the same machine used for development.
12-05-2014 06:51 PM
Hello JeffPaluck,
How are you giving the DB Tools Open Connection.vi connection information? Is the file path to your DSN file hardcoded or are you using relative path VI (ex Application Directory VI) to locate it. Have you tried running your development code and your executable on another computer?
12-05-2014 06:57 PM - edited 12-05-2014 07:00 PM
The file path was hardcoded. I tried running it on multiple machines with the same error. I have since created a new project and started rebuilding the code from scratch. I think something in my old files are corrupted as the new code is working after I build it. *fingers crossed* Thanks for taking the time to respond and try and help! Much appreciated 🙂
Edit: I had tried changing so many things to get my project to work that I don't know what I might have messed up in the process. Marking this as solved because the original problem is so convoluted it was likely my own mistake with the creation of the DSN/UDL file or maybe even a glitch with our SQL Server. It has since been rebooted.