problem with n_settexisparam API

Post Reply
acoulson0
Posts: 8
Joined: Thu Dec 21, 2000 8:01 am

problem with n_settexisparam API

Post 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
acoulson0
Posts: 8
Joined: Thu Dec 21, 2000 8:01 am

problem with n_settexisparam API

Post by acoulson0 »

Would I encounter the same problem using n_preptx and n_exectx?
sbeavers
Posts: 9
Joined: Wed Jan 31, 2001 7:31 pm

problem with n_settexisparam API

Post 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?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

problem with n_settexisparam API

Post by mark »

Post Reply