LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error message while attempting to read table from SQL Server

Solved!
Go to solution

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!

Download All
0 Kudos
Message 1 of 17
(6,051 Views)

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?


GCentral
0 Kudos
Message 2 of 17
(5,989 Views)

What's the error message?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 17
(5,986 Views)

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.


GCentral
0 Kudos
Message 4 of 17
(5,983 Views)

Usually the most important info is from the ADO error message.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 17
(5,978 Views)

This is the error message, I didn't notice that I missed the error image... my bad...

0 Kudos
Message 6 of 17
(5,970 Views)

This is the error message. It happened yesterday just before I posted here in forum...

0 Kudos
Message 7 of 17
(5,948 Views)

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?

0 Kudos
Message 8 of 17
(5,964 Views)

Timeout error. It seems that the server is not available. Is SQLServer located on another machine?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 9 of 17
(5,953 Views)

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?

0 Kudos
Message 10 of 17
(5,943 Views)