INFORMIX ESQL/C prepare statement crashes
Posted in 1997
Hello All, I am having a problem with a prepare statement crashes after several calls. See below for more detail. We are using INFORMIX Online Server 7.10.UC2, INFORMIX-ESQL Version 5.02.UC7 on HP-UX 9.03 and encountering problem on the following function written in ESQL/C: int KeyFound (table_name, key_name) char *table_name; char *key_name; { struct sqlda *descp; $char stmt_buf[40]; int i, found; sprintf (stmt_buf, "select * from informix.%s", table_name); $prepare select_stmt from :stmt_buf; if (SQLCODE != 0) return SQLCODE; $describe select_stmt into descp; if (SQLCODE != 0) return SQLCODE; found = 0; for (i = 0; !found && i < descp->sqld; i++) { if (strcmp (descp->sqlvar[i].sqlname, key_name) == 0) found = 1; } $free select_stmt; free (descp); return found; } The calling program executes this function multiple times. On the Nth call, when the prepare statement executes, the program crahes and exits to the UNIX prompt with no error message. -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet