@@ -13,7 +13,7 @@
15static char sql_query_buffer[2000];
15static char sql_query_buffer[2000];
16−
16+unsigned char* array;
18void* sqlite3_open_idr(const char *filename){
18void* sqlite3_open_idr(const char *filename){
@@ -242,19 +242,22 @@ const unsigned char* sqlite3_get_val_text(void* p,const char* tbl_name,int nRow,
242 rc = sqlite3_step(stmt);
242 rc = sqlite3_step(stmt);
244 while (rc == SQLITE_ROW && counter < nRow){
244 while (rc == SQLITE_ROW && counter < nRow){
247 rc = sqlite3_step(stmt);
246 rc = sqlite3_step(stmt);
248 counter++;
247 counter++;
251+ array =(unsigned char *) malloc(1000*sizeof(char));
251 text_val =sqlite3_column_text(stmt, nCol);
252 text_val =sqlite3_column_text(stmt, nCol);
253+ memcpy(array, text_val, sizeof(text_val));
252 printf("text_val : %s\n", text_val );
254 printf("text_val : %s\n", text_val );
253 rc =sqlite3_finalize(stmt);
255 rc =sqlite3_finalize(stmt);
254 if( rc != SQLITE_OK){
256 if( rc != SQLITE_OK){
255 printf("Couldn't finalize.\n");
257 printf("Couldn't finalize.\n");
257− return text_val;
260+ return array;