I don't appear to be having any luck using the n_setttexisparam API followed by n_texis to execute the query.
This code fragment:
if (!n_settexisparam(se,1,"KR",(int *)NULL,SQL_C_CHAR,SQL_LONGVARCHAR)) {
printf("setparam failed\n");
} else if(!n_texis(se, "select id from patent where length(pabstract)=?;", sql)) {
FREE_CONFIG();
printf("%s\n", errorString);
}
Produces this result:
SQL: Needed parameters not supplied in the function: execntexis
While initializing the database for the first n_texis call the parameters are getting removed. We will work on getting that resolved, but the simplest workaround would be to run a simple query first, e.g.
I notice in this example the programmer was able to get an error text message using "errorString" which appears to be something he defined in his program. How do I get the error text from an unsuccessful call to n_texis?
API errors are reported through the putmsg() function. acoulson0 is probably setting a global within a customized putmsg() function. See putmsg replacement in the manual