Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread Simon Davies
2009/11/11 T : > > i`ve done it, and i think i understand it :) > > thank you.. > > > few more question to be sure that i`m not missing something important.. > > if i use prepared statements only (dont use exec function in program at all) > i dont need callback function,

Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread TTTTT
i`ve done it, and i think i understand it :) thank you.. few more question to be sure that i`m not missing something important.. if i use prepared statements only (dont use exec function in program at all) i dont need callback function, do i? somehow after i replaced exec (i.e.

Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread Simon Davies
2009/11/11 T : > . . . > >> and finaly i get SQLITE_DONE but it still doesnt show me table i have >> selected... > > See http://www.sqlite.org/c3ref/column_blob.html > > > i dont understand what exactly do you mean.. > > combination of these: > > sqlite3_value

Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread Marcus Grimm
you may also take a look at: http://www.sqlite.org/cvstrac/wiki?p=SimpleCode it explains how to use the step mechanism. hth Marcus > > > why not: > int smth = sqlite3_step (statement2); > while( smth == SQLITE_ROW ) > { > printf( "\n command= %s result code = %d \n",

Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread TTTTT
why not: int smth = sqlite3_step (statement2); while( smth == SQLITE_ROW ) { printf( "\n command= %s result code = %d \n", command, smth ); smth = sqlite3_step (statement2); } so that it will work no matter how many rows because I dont have much experience :)

Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread Simon Davies
2009/11/11 T : > > i think i understand why it doesnt work for select *.. > > because sqlite_step executes one row at time.. so after i prepare SELECT * , > i need to use sqlite_step as many times as table i`m selecting from has rows > (in this case 3 times).. > so i made

Re: [sqlite] execute or prepare+step+finalize

2009-11-11 Thread TTTTT
i think i understand why it doesnt work for select *.. because sqlite_step executes one row at time.. so after i prepare SELECT * , i need to use sqlite_step as many times as table i`m selecting from has rows (in this case 3 times).. so i made another function that looks like this: bool