10-06-2011 09:38 AM - edited 10-06-2011 09:40 AM
I have test software in LabVIEW 2011 that logs results into our SQL Server database with a stored procedure. Once I got it working consistently, I checked it into our Visual Sorce Safe. It was working until I tried to build the software into an executable. Upon trying to log results in the executable, I received the following -2147217900 error when trying to execute the stored procedure (the ati_sp_InsertProcedureRun stored procedure) to create the procedure run in the database:
NI_Database_API.lvlib:Cmd Execute.vi->DBAccess.vi->AgilentQCTool.vi->ATIEOL.vi<ERR>ADO Error: 0x80040E14
Exception occured in Microsoft OLE DB Provider for SQL Server: Syntax error or access violation in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->DBAccess.vi->AgilentQCTool.vi->ATIEOL.vi
What's really odd is that I began receiving this error in the development environment. On multiple computers. I have verified that the code is still the same as before; I pulled the VI from Source Safe, which predated the last time I successfully logged results.
I don't know if attempting to run as an executable was the precipitating event. Around the same time, I attempted to solve a problem where the test software kept referring to VIs from the 2010 Database Connectivity Toolkit by uninstalling the 2010 Database Connectivity Toolkit and letting LabVIEW update the called VIs to the 2011 versions and saving. I've also since tried repairing and then uninstalling and reinstalling the 2011 Database Connectivity Toolkit.
Attached is a standalone implementation of my database logging code, a little sanitized for proprietary information. Has anyone encountered similar mysterious errors when changing from 2010 to 2011 or when building executables? The code I'm using is the same, and IS assures me that there have been no changes to the database.
Thank you for any help or insight,
John
Solved! Go to Solution.
10-06-2011 10:52 AM
Oh yeah, more background I just thought of: I can execut the procedure from SQL Server Management Studio 2008 and one of my coworkers uses the procedure in his C# application, and it still is able to execute the procedure.
10-07-2011 05:10 PM
Hello There,
This problem seems perplexing, hopefully I can figure something out over the weekend.
Dano
10-07-2011 05:19 PM
Thanks, Dano. I'm still waiting for that "Duh!" head-slap moment, where I find the obvious, simple error that was the wrench in the machine. It hasn't happened yet
10-10-2011 01:54 PM
Hello,
So far I have been unable to see anything that gives me a lead as to what the problem could be. For this I am sorry.I think both of us will have one of those face palm moments.
I have a question and comment for you, does the Code still work on the original computer?
Second, I think it would help if you compiled a version of code with the ability to highlight execution. after being installed as an executable. Try running the executable (in highlight mode) on the other computers and see where it breaks.
Could you also send me a version of your code in Highlight execution mode?
As for me I downloaded your code and I was unable to get it to even run on my computer.
Dano
Highlight Execution debuggable executable.
http://ae.natinst.com/public.nsf/web/searchinternal/3087d91eeadbaf3d862571d1004af192?OpenDocument
10-11-2011 07:09 AM
Sorry, I had left out some dependencies in the zip. See the updated .zip file.
The code does not still work on the original computer. Running in remote debugging shows the error occurring at the same place.
10-11-2011 10:15 AM
I can still not get your code to run or even load all the VI's and CTL files.
Let me list the .vi and .ctl files that I cannot find on my computer.
Would you provide these:
PlaceFPAE.vi
PlaceFPStates.ctl
Test.ctl
Tests.ctl
StoreResults.ctl
10-11-2011 10:20 AM
Did you download that last attachment? It should have all necessary files. The files you're asking for aren't referenced by the main VI anymore. I copied and renamed them to have the whole thing out of source control. If you open the project, you may have to re-add the main file DB_UT.vi.
10-11-2011 01:50 PM
My mistake.
10-11-2011 02:25 PM
No problem