i already got it working..the only problem was that my condition ( char * ) =
"id=1"..i got it working when i made it to "id = 1"..spaces did that trouble
to my code..however, is still have the free(): invalid pointer problem in my
sqlite3_close..this is my code for my close api:

    if( GDBM_Db_p != NULL )
    {
        printf( "FDBM_Close: GDBM_Db_p is not NULL\n" );
        /* closes the database */
        sqlite3_close( GDBM_Db_p );
    }
    else
    {
        printf( "FDBM_Close: GDBM_Db_p is NULL\n" );
    }

the problem only occurs when sqlite3_prepare returns an error code other
than SQLITE_OK..mostly, ..SQLITE_ERROR


Dennis Cote wrote:
> 
> arbalest06 wrote:
>> im implementing a C program that uses the sqlite as my database..im using
>> a
>> global database pointer because im creating my apis for open and close
>> database..my problem is that when i put a select query, the return value
>> is
>> 1..i copied my query to the console of sqlite3 and it worked perfectly
>> fine..therefore, the database is accessible and present, and the query is
>> correct..i cant think of anything that will cause this problem..
>>
>> also, when i close the database, after this scenario, it gave me a
>> free():
>> invalid pointer..and it was pointed to where sqlite3_close is..
>>
>>   
> Your call to sqlite3_open() probably failed, possibly due to a bad file 
> name or path. Did you check the return code from sqlite3_open()? If the 
> open failed you should have a NULL value in your database pointer. This 
> will generate errors when you try to execute queries, and it may also 
> cause debug versions of free to complain. Just a thought.
> 
> If you still have trouble, you will need to post your code to get better 
> help.
> 
> HTH
> Dennis Cote
> 
> 
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/query-does-not-work-on-sqlite-c-apis-but-works-on-the-console-tp14436330p14439012.html
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to