n_texis() - SQL interface

SYNOPSIS

int n_texis(SERVER *se,char *queryformat,...);


DESCRIPTION
This function comprises the real work that is to be performed by the network Texis server. To initiate the actual search the program makes a call to the n_texis() function. The server will begin to call the client's callback routine that was set in the n_regtexiscb() call. The n_texis() function will return 0 on error or true if all goes well. NOTE: It is not considered an error for there to be zero hits located by a search. A client's callback routine will never be invoked in this instance.

The queryformat argument is a printf() style format string that will be filled in by any subsequent arguments and then executed.


EXAMPLE

#include <sys/types.h>
#include "tstone.h"
main(argc,argv)
int argc;
char **argv;
{
 SERVER *se;
 char buf[80];
 USERDATA mydata;

 ...
 n_regtexiscb(se,mydata,hit_handler);         /* setup hit callback */
 n_setdatabase(se,argv[1]);               /* set database to search */
 while(gets(buf)!=(char *)NULL)                 /* crude user input */
    if(!n_texis(se,"%s;",buf))     /* add required ';' for the user */
         puts("ERROR in n_texis");
 ...
}


SEE ALSO
Your system's printf() man page for the format string % codes.

n_settexisparam()


Copyright © Thunderstone Software     Last updated: Oct 5 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.