07-13-2017 11:36 AM - edited 07-13-2017 11:51 AM
Hello I recently did a VI with MS SQL Server 2016 connection, I'm using SQL Serve Native Client 11.0. This program currently saves information in Server, and checks for repeated information. I've already checked this two posts, but didn't found information that would clear my problem...
The weird thing about this error, is that it just appears randomly. During this month it was only appeared twice. What I do: close the exe
and run it again. Then it will continue to work just fine, without pop up error messages.
Can someone help me please. I would appreciate it, a lot. I'm attaching the images.
Many thanks in advance!
Solved! Go to Solution.
07-14-2017 04:09 AM
In the VIs that call the VI pictured in Capture3.JPG, is there something that can cause a race condition, especially with regards to the Database UDL File Path?
Hitting a bug only occasionally like you're describing sounds a lot like a possible race condition. I would guess it's pretty marginal since you only hit it twice in a month, but it sounds like there's some chance on each start?
07-14-2017 04:27 AM
What's the error message?
07-14-2017 04:36 AM - edited 07-14-2017 04:37 AM
I'd go ahead and guess the error code is -2147467259 from the linked posts.
From the explain window I only get the following (perhaps I'm missing a relevant toolkit?):
Error -2147467259 occurred at an unidentified location
Possible reason(s):
LabVIEW: (Hex 0x80004005) Unspecified error.
=========================
LabVIEW: (Hex 0x80004005) Unspecified error.
=========================
NI System Configuration: (Hex 0x80004005) Miscellaneous operation failure.
The first linked post however gives the following message:
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
which makes it sound like the error is thrown by the database directly, due to an access violation. I'm guessing it doesn't finish initializing before the connection is called, or similar.
07-14-2017 04:58 AM
Usually the most important info is from the ADO error message.
07-14-2017 07:36 AM
This is the error message, I didn't notice that I missed the error image... my bad...
07-14-2017 07:39 AM
This is the error message. It happened yesterday just before I posted here in forum...
07-14-2017 07:52 AM
I don't know if it's a race condition. I always try to use at least the error signal, just to give an order to my programs. Here is a picture from the
outer code that call this VI. Does someone have any suggestions?
07-14-2017 08:22 AM - edited 07-14-2017 08:22 AM
Timeout error. It seems that the server is not available. Is SQLServer located on another machine?
07-14-2017 08:55 AM
Yes, it's located on a server, physical server. Though all the PC where I installed this program, are connected to the intranet through ETHERNET cable... I never use WiFi, to avoid connectivity issues.
So by your statement I'm understanding that at some point the server it's not accessible because of the timeout? I have 100 ms in the timeout. If I increase the timing do you think it will help?