Page 1 of 1

problem with n_settexisparam API

Posted: Thu Dec 21, 2000 8:09 am
by acoulson0
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

problem with n_settexisparam API

Posted: Thu Dec 21, 2000 2:14 pm
by acoulson0
Would I encounter the same problem using n_preptx and n_exectx?

problem with n_settexisparam API

Posted: Wed Jan 31, 2001 10:46 pm
by sbeavers
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?

problem with n_settexisparam API

Posted: Thu Feb 01, 2001 10:04 am
by mark
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

http://thunderstone.master.com/texis/ma ... eplacement