Hye.
 
I have problems with using of CVI SQL TOOLKIT DBCreateParamChar() statment.
 
I create a stored procedure "My_Proc_Stoc" on my database wich have a char(5) input parameter. 
I use the DBCreateParamChar() to set the input parameter but I have some problems.
 
This is a example of my source code :
 
int rescode;
char par[6];
...
   hstmt = BDPreparedSQL(handle, "My_Proc_Stoc);
   rescode = DBCreateParamChar(hstmt,"",DB_PARAM_INPUT,par,"");
   rescode = DBExecutePreparedSQL(hdbc);
 
I the "par" variable is not set the statment works, but its not what i want to do.
 
When I set the "Par variable like this the statment works :
par[1]='1';
par[2]='2';
par[3]='3';
par[4]='4';
par[5]='5';
 
When I set the "Par variable like this the statment doesn't work :
par[0]='1';     // Problems when trying to set the first element of the char table
par[1]='2'; 
par[2]='3'; 
par[3]='4'; 
par[4]='5'; 
par[5]='6';
 
Do you know what is the problem in the second example ?
have you examples of use ?
 
PS : I have used stored procedures whith other input types (int, short, .. ) and it works well. The problem was on tying to set an input Char parameter.
 
Thanks.
 
 
         Message Edité par lio33 le 10-26-2005 05:52 AM