Changeset 28 for vtcross/trunk/src/cbr.c
- Timestamp:
- 11/13/08 15:40:16 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/cbr.c
r26 r28 56 56 char *zErrMsg = 0; 57 57 58 //printf("command: %s\n", _cbr->command);58 printf("command: %s\n", _cbr->command); 59 59 rc = sqlite3_exec(_cbr->db, _cbr->command, callback, 0, &zErrMsg); 60 60 if( rc!=SQLITE_OK){ … … 62 62 sqlite3_free(zErrMsg); 63 63 } else{ 64 //printf("command executed.\n");64 printf("command executed.\n"); 65 65 } 66 66 return rc; … … 74 74 unsigned int i; 75 75 76 //printf("command: %s\n", _cbr->command);76 printf("command: %s\n", _cbr->command); 77 77 sqlite3_stmt * pStatement; 78 78 rc = sqlite3_prepare_v2(_cbr->db, _cbr->command, -1, &pStatement, NULL); … … 80 80 for (i=0; i<_cbr->num_columns; ++i) 81 81 _retvals[i] = sqlite3_column_double(pStatement, i); 82 } else {83 //printf("no row found\n");84 return 0;85 82 } 86 83 sqlite3_finalize(pStatement); … … 94 91 }*/ 95 92 96 return 1;93 return rc; 97 94 } 98 95 … … 224 221 225 222 //ExecuteCommand(_cbr); 226 return ExecuteSearchCommand(_cbr, _retvals); 227 228 #if 0 223 ExecuteSearchCommand(_cbr, _retvals); 224 229 225 printf("search result: "); 230 226 for (i=0; i<_cbr->num_columns; i++) … … 233 229 234 230 return 0; 235 #endif236 231 } 237 232 … … 243 238 244 239 // generate command 245 //printf("%s\n", _cbr->command);240 printf("%s\n", _cbr->command); 246 241 strcpy(_cbr->command, "insert into "); 247 242 strcat(_cbr->command, _cbr->tablename);