|
Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006
Procedure novice seeking suggest ~ ~
I want to prepare months function, the function it is to complete the form by the Senate : char *sql_Strsql_Str
Transfer into a SQL inquiries, then pass the results to set char **record out inquiries.
Function encountered difficulties in the preparation process, experts suggest Thank you for giving me months
: : GetRecordCollection [code]void DBControl (char *sql_Str, char **record)
{
If (*sql_Str ====== NULL)
Return;
EXEC SQL BEGIN DECLARE SECTION;
Char sqlstr[200];
EXEC SQL DECLARE SECTION; residents
Memset (sqlstr '\0', sizeof (sqlstr));
Strcpy (sqlstr, sql_Str);
EXEC SQL PREPARE stat sqlstr; FROM :
EXEC SQL DECLARE CURSOR FOR stat; result_cursor
EXEC SQL OPEN result_cursor;
EXEC SQL WHENEVER break; DO NOT FOUND
For (are;)
{
/****************************************
Here take the field because of the number of non-fixed, I do not
Know how to pass data sets as a result of the inquiries **record
******************************************/
}
EXEC SQL CLOSE result_cursor;
}[/code] |
Procedure novice seeking suggest ~ ~
This, you must use dynamic SQL method 4, instead of the one or two sentences to be able to offer a clear, or b see. |
| |