01-16-2006 03:03 PM
Hi,
I am working with the Database Toolset for a Labview 7.1 application. I would like to know if it is possible to catch real server error code from SQL server 2000.
Example:
for a code SQL = 1105, "Can't allocate space for object '???' in database ‘???' because the 'system segment is full …'” «,
I get the Labview code error -2147217900. I attemp for error code 1105....
Thanks for any help.
01-16-2006 03:21 PM
01-24-2006 11:11 AM
01-24-2006 11:16 AM
01-24-2006 11:43 AM
I really have no idea.
The ADO hierarchy is probably at least partially documented on the MSDN site, so you might try reading up on it there.
You might wish to consider whether you really want the original error codes. Part of the advantage of working with abstraction layers like ADO is that they allow you not to be dependant on a single source (in this case, a specifc DB). It might be preferable just to find out what the ADO error codes mean and use them. You can then make a utility out of this which will return standard error messages (although I'm a bit surprised that the NI VIs don't have this internally).
One thing to note (although I understand this is only an example and it is probably irrelevant in this case) is that you're not closing the command object reference returned from the Execute method.
01-24-2006 11:59 AM
OK.
While I dont get a better way to go ahead, I have to use the Error Message (String) for errors managing. The problem is that I have to get it in two Languages (English and French). I would prefer get the SQL native error number code, because it is the same for any languages and it is also more specific.
Yhanks for your attention.