LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL SP works, then throws 0x80040E14 after trying to build executable

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 24
(4,581 Views)

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.

0 Kudos
Message 2 of 24
(4,574 Views)

Hello There,

 

This problem seems perplexing,  hopefully I can figure something out over the weekend.

 

Dano

0 Kudos
Message 3 of 24
(4,555 Views)

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 Smiley Sad

0 Kudos
Message 4 of 24
(4,553 Views)

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

0 Kudos
Message 5 of 24
(4,541 Views)

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.

0 Kudos
Message 6 of 24
(4,533 Views)

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

0 Kudos
Message 7 of 24
(4,528 Views)

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.

0 Kudos
Message 8 of 24
(4,525 Views)

My mistake.

0 Kudos
Message 9 of 24
(4,520 Views)

No problem

0 Kudos
Message 10 of 24
(4,515 Views)