@@ -84,8 +84,7 @@ void* sqlite3_prepare_idr(void *db,const char *zSql){
8484 dbi ->Ptr_tail = tail;
8585
8686 if(rec != SQLITE_OK){
87− fprintf(stderr, "SQL Prepare error.\n");
88− return dbi;
87+ return NULL;
8988 }
9089
9190 return dbi;
@@ -158,7 +157,7 @@ int sqlite3_get_data_type(void* p,const char* tbl_name, int nRow, int nCol){
158157
159158 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
160159 if(rc != SQLITE_OK){
161− fprintf(stderr, "SQL Prepare error");
160+ fprintf(stderr, "SQL Prepare error\n");
162161 return rc;
163162 }
164163 rc = sqlite3_step(stmt);
@@ -197,7 +196,7 @@ int sqlite3_get_val_int(void* p,const char* tbl_name, int nRow, int nCol){
197196
198197 rc = sqlite3_prepare_v2(dbi->db_ptr, sql_query_buffer, -1, &stmt, &tail);
199198 if(rc != SQLITE_OK){
200− fprintf(stderr, "SQL Prepare error");
199+ fprintf(stderr, "SQL Prepare error\n");
201200 return rc;
202201 }
203202 rc = sqlite3_step(stmt);
@@ -308,7 +307,6 @@ int sqlite3_step_idr(void* db){
308307
309308 DBinfo* dbi =(DBinfo*) db;
310309 int rc =sqlite3_step(dbi->ppStmt);
311−
312310 return rc;
313311}
314312
@@ -320,13 +318,9 @@ int sqlite3_bind_int_idr(void* p,int index, int val){
320318 printf("\nThe statement has %d wildcards\n", sqlite3_bind_parameter_count(dbi->ppStmt));
321319 rc =sqlite3_bind_int(dbi->ppStmt,index,val);
322320 if(rc != SQLITE_OK){
323− printf("\nCould not bind int.\n");
324− return 1;
325− }
326− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
327− printf("\nCould not step (execute) stmt.\n");
328321 return 1;
329322 }
323+
330324 return rc;
331325}
332326
@@ -339,14 +333,9 @@ int sqlite3_bind_float_idr(void* p,int index, float val){
339333 rc =sqlite3_bind_double(dbi->ppStmt,index,res);
340334
341335 if(rc != SQLITE_OK){
342− printf("\nCould not bind float.\n");
343336 return 1;
344337 }
345338
346− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
347− printf("\nCould not step (execute) stmt.\n");
348− return 1;
349− }
350339 return rc;
351340}
352341
@@ -356,13 +345,9 @@ int sqlite3_bind_null_idr(void* p,int index){
356345 int rc;
357346 rc =sqlite3_bind_null(dbi->ppStmt,index);
358347 if(rc != SQLITE_OK){
359− printf("\nCould not bind null.\n");
360− return 1;
361− }
362− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
363− printf("\nCould not step (execute) stmt.\n");
364348 return 1;
365349 }
350+
366351 return rc;
367352}
368353
@@ -372,13 +357,9 @@ int sqlite3_bind_text_idr(void* p,const char* text, int index,int length){
372357 int rc;
373358 rc =sqlite3_bind_text(dbi->ppStmt,index,text,length,SQLITE_STATIC);
374359 if(rc != SQLITE_OK){
375− printf("\nCould not bind null.\n");
376− return 1;
377− }
378− if (sqlite3_step(dbi->ppStmt) != SQLITE_DONE) {
379− printf("\nCould not step (execute) stmt.\n");
380360 return 1;
381361 }
362+
382363 return rc;
383364
384365}