home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <string.h>
-
-
- /* --------------------------------------------------------------------- */
- /* This is a simple executable that execs a sql command */
- /* Jason Ng NCSA Dec 1993 likkai@ncsa.uiuc.edu */
- /* INPUTS */
- /* arg0 is exec name */
- /* arg1 is sql string */
- /* arg2, arg3,.. are user-defines */
- /* User-defines are of the form "name=evalue" eg "USER=jason" */
-
- /* --------------------------------------------------------------------- */
-
- main(ac,av) int ac; char**av;
- {
- int i;
-
- char * sqlstring = NULL;
-
- /*
- printf("SQLPROG HAS %d ARGS\n", ac);
- for(i=0;i<ac;i++) printf("<li> %d : [%s]\n", i, av[i]);
- */
-
- if (ac<3) exit(0);
- app_parseargs(ac,av);
- sqlstring = strdup(av[1]);
- execute_sql(sqlstring);
-
- }
-