#include <stdio.h>
#include "tdhkit.h"
#include "shsql.h"

int
main()
{
int i, stat, stat2, nfields;
char *fields[80];
char com[256];
FILE *fp;

/* get config file.. */
stat = SHSQL_allconfig();
if( stat != 0 ) { fprintf( stderr, "error %d on attempt to read config file\n", stat ); exit( 1 ); }
SHSQL_translog = 0;


for( i = 0; i < 1000; i++ ) {

	sprintf( com, "insert into test1 values ( %d )", i+1 );
	stat = SHSQL_sql( 0, com );
	if( stat != 0 ) break;  
	
	/* sprintf( com, "select * from test1 where val = %d", i+1 );
	 * stat = SHSQL_sql( 0, com );
	 * if( stat != 0 ) break;  
	 */

	sprintf( com, "delete from test1 where val = %d", i+1 );
	stat2 = SHSQL_sql( 0, com );
	if( stat2 != 0 ) break;
	
	}
printf( "stat=%d stat2=%d  i=%d\n", stat, stat2, i );

exit( 0 );
}

