@@ -84,8 +84,7 @@ void* sqlite3_prepare_idr(void *db,const char *zSql){
84 dbi ->Ptr_tail = tail;
84 dbi ->Ptr_tail = tail;
86 if(rec != SQLITE_OK){
86 if(rec != SQLITE_OK){
87− fprintf(stderr, "SQL Prepare error.\n");
88− return dbi;
87+ return NULL;
91 return dbi;
90 return dbi;
@@ -158,7 +157,7 @@ int sqlite3_get_data_type(void* p,const char* tbl_name, int nRow, int nCol){
159 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
158 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
160 if(rc != SQLITE_OK){
159 if(rc != SQLITE_OK){
161− fprintf(stderr, "SQL Prepare error");
160+ fprintf(stderr, "SQL Prepare error\n");
162 return rc;
161 return rc;
164 rc = sqlite3_step(stmt);
163 rc = sqlite3_step(stmt);
@@ -197,7 +196,7 @@ int sqlite3_get_val_int(void* p,const char* tbl_name, int nRow, int nCol){
198 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
197 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
199 if(rc != SQLITE_OK){
198 if(rc != SQLITE_OK){
200− fprintf(stderr, "SQL Prepare error");
199+ fprintf(stderr, "SQL Prepare error\n");
201 return rc;
200 return rc;
203 rc = sqlite3_step(stmt);
202 rc = sqlite3_step(stmt);
@@ -308,7 +307,6 @@ int sqlite3_step_idr(void* db){
309 DBinfo* dbi =(DBinfo*) db;
308 DBinfo* dbi =(DBinfo*) db;
310 int rc =sqlite3_step(dbi->ppStmt);
309 int rc =sqlite3_step(dbi->ppStmt);
312 return rc;
310 return rc;
@@ -320,13 +318,9 @@ int sqlite3_bind_int_idr(void* p,int index, int val){
320 printf("\nThe statement has %d wildcards\n", sqlite3_bind_parameter_count(dbi->ppStmt));
318 printf("\nThe statement has %d wildcards\n", sqlite3_bind_parameter_count(dbi->ppStmt));
321 rc =sqlite3_bind_int(dbi->ppStmt,index,val);
319 rc =sqlite3_bind_int(dbi->ppStmt,index,val);
322 if(rc != SQLITE_OK){
320 if(rc != SQLITE_OK){
323− printf("\nCould not bind int.\n");
326− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
327− printf("\nCould not step (execute) stmt.\n");
328 return 1;
321 return 1;
330 return rc;
324 return rc;
@@ -339,14 +333,9 @@ int sqlite3_bind_float_idr(void* p,int index, float val){
339 rc =sqlite3_bind_double(dbi->ppStmt,index,res);
333 rc =sqlite3_bind_double(dbi->ppStmt,index,res);
341 if(rc != SQLITE_OK){
335 if(rc != SQLITE_OK){
342− printf("\nCould not bind float.\n");
343 return 1;
336 return 1;
346− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
347− printf("\nCould not step (execute) stmt.\n");
350 return rc;
339 return rc;
@@ -356,13 +345,9 @@ int sqlite3_bind_null_idr(void* p,int index){
357 rc =sqlite3_bind_null(dbi->ppStmt,index);
346 rc =sqlite3_bind_null(dbi->ppStmt,index);
358 if(rc != SQLITE_OK){
347 if(rc != SQLITE_OK){
359− printf("\nCould not bind null.\n");
362− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
363− printf("\nCould not step (execute) stmt.\n");
364 return 1;
348 return 1;
366 return rc;
351 return rc;
@@ -372,13 +357,9 @@ int sqlite3_bind_text_idr(void* p,const char* text, int index,int length){
373 rc =sqlite3_bind_text(dbi->ppStmt,index,text,length,SQLITE_STATIC);
358 rc =sqlite3_bind_text(dbi->ppStmt,index,text,length,SQLITE_STATIC);
374 if(rc != SQLITE_OK){
359 if(rc != SQLITE_OK){
375− printf("\nCould not bind null.\n");
378− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
379− printf("\nCould not step (execute) stmt.\n");
380 return 1;
360 return 1;
382 return rc;
363 return rc;