07-14-2017 10:12 AM
No, I don't think the timeout on the Labview code is the issue. It looks like the SQL server is not available for some reason and your connection attempt times out. You could try to handle the error returned by the SQL driver and then try to connect again and repeat a couple of times and if there is no connection after a few attempts then throw a connection timeout error. This way you can handle the error in your Labview code rather than having the SQL timeout error stop your program.
07-14-2017 12:30 PM
07-14-2017 05:17 PM
Well it makes sense what you're stating. I'll give it a try. Thanks for your reply.
11-20-2017 02:03 AM
very well
@cbutcher wrote:
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.viwhich 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.
11-20-2017 02:03 AM
11-20-2017 02:07 AM
11-22-2017 08:07 AM
What I basically had to do is that when I get this type of error, I save the query in a .txt file. I execute the saved queries when connection to SQL Server is established back again.
Thanks all for your support.