LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a bigint from SQL Server in CVI?

Hello,

I am trying to get a bigint value (64 bit integer) from SQL Server 2005 in CVI (version 8.0 with SQL Toolkit) through a stored procedure. I am using the SQL with parameters functions just like in the examples I found in the function panels, only I could not find anything about 64 bits integers, and I cannot make it work.
- using a double (also 64 bits) returns an invalid type error at parameter getting (after the statement is closed) :
    iStatus = DBGetParamDouble (iUUTSQLHdl, iParamNb, &dDistantUUTId);
- using a binary returns an "array is not safe" error at the same point (the variable is a char array)
    iStatus = DBGetParamDouble (iUUTSQLHdl, iParamNb, (void**)&tcDistantUUTId);

I do not need do make any change to the variable I get, I jus want to copy it afterwards for another procedure (but I cannot do both procedures in the same procedure), the value I want is the ID of a record.

Thank you for your help

Best regards

Christophe
0 Kudos
Message 1 of 3
(3,536 Views)

Hello Christophe,

Sorry for being that late answering you. Are you still facing the problem ?

Regards,

0 Kudos
Message 2 of 3
(3,488 Views)
Hello Mathieu,

I found a way to avoid having to get this int64 by using the SQL Server keyword @@identity ; this way I could do both commands in a single request.
So my problem is solved, but I still do not have an answer to the question "how can I get an int64 or bigint from SQL Server". Although I do not need this right now, it might be useful to somebody if you have a clue.

Thank you for answering

best regards

Christophe
0 Kudos
Message 3 of 3
(3,445 Views)