Changeset 28 for vtcross/trunk/src/cbr.c

Show
Ignore:
Timestamp:
11/13/08 15:40:16 (16 years ago)
Author:
ahe
Message:

incorporate ezxml with cbr

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vtcross/trunk/src/cbr.c

    r26 r28  
    5656    char *zErrMsg = 0; 
    5757 
    58     //printf("command: %s\n", _cbr->command); 
     58    printf("command: %s\n", _cbr->command); 
    5959    rc = sqlite3_exec(_cbr->db, _cbr->command, callback, 0, &zErrMsg); 
    6060    if( rc!=SQLITE_OK){ 
     
    6262        sqlite3_free(zErrMsg); 
    6363    } else{ 
    64         //printf("command executed.\n"); 
     64        printf("command executed.\n"); 
    6565    } 
    6666    return rc; 
     
    7474    unsigned int i; 
    7575 
    76     //printf("command: %s\n", _cbr->command); 
     76    printf("command: %s\n", _cbr->command); 
    7777    sqlite3_stmt * pStatement; 
    7878    rc = sqlite3_prepare_v2(_cbr->db, _cbr->command, -1, &pStatement, NULL); 
     
    8080        for (i=0; i<_cbr->num_columns; ++i) 
    8181            _retvals[i] = sqlite3_column_double(pStatement, i); 
    82     } else { 
    83         //printf("no row found\n"); 
    84         return 0; 
    8582    } 
    8683    sqlite3_finalize(pStatement); 
     
    9491    }*/ 
    9592 
    96     return 1; 
     93    return rc; 
    9794} 
    9895 
     
    224221 
    225222    //ExecuteCommand(_cbr); 
    226     return ExecuteSearchCommand(_cbr, _retvals); 
    227      
    228 #if 0 
     223    ExecuteSearchCommand(_cbr, _retvals); 
     224     
    229225    printf("search result: "); 
    230226    for (i=0; i<_cbr->num_columns; i++) 
     
    233229 
    234230    return 0; 
    235 #endif 
    236231} 
    237232 
     
    243238     
    244239    // generate command 
    245     //printf("%s\n", _cbr->command); 
     240    printf("%s\n", _cbr->command); 
    246241    strcpy(_cbr->command, "insert into "); 
    247242    strcat(_cbr->command, _cbr->tablename);