cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Error message while attempting to read table from SQL Server

¡Resuelto!
Ir a solución
Solución
Aceptado por JLuna

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.

0 kudos
Mensaje 11 de 17
4.277 Vistas

If you make the VI that causes/catches the error shared re-entrant, you can have it use the Clear Error VI with the specific number, and then use the boolean output to run a case structure with a Wait and then call the same VI again (i.e. itself)


GCentral
0 kudos
Mensaje 12 de 17
4.232 Vistas

Well it makes sense what you're stating. I'll give it a try. Thanks for your reply.

0 kudos
Mensaje 13 de 17
4.202 Vistas

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.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.


 

0 kudos
Mensaje 14 de 17
3.916 Vistas

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.

0 kudos
Mensaje 17 de 17
3.895 Vistas