Re: [sqlite] Problem with sqlite3 on CGI scripts with ANSI C

2006-12-15 Thread Jay Sprenkle
On 12/15/06, Francesco Andrisani <[EMAIL PROTECTED]> wrote: Hi comunity, i have the follow problem. I've insert into a C-CGI page a small sqlite3 code. When i call the page from a browser, it exec a query and show on browser the entries, but it don't work. If i add a "printf" above the

Re: [sqlite] Problem with sqlite3 on CGI scripts with ANSI C

2006-12-15 Thread Cesar Rodas
Here is fixed your bug.. :D.. I'd use the Option 2. Option 1: printf("\nhello [1]"); if (sqlite_open("myDB.db", )) error_handle(db); printf("\n hello [2]"); Option 2: printf("\nhello [1]"); if (sqlite_open("myDB.db", )) { error_handle(db); } printf("\n hello [2]"); On 15/12/06, John

Re: [sqlite] Problem with sqlite3 on CGI scripts with ANSI C

2006-12-15 Thread John Stanton
How do you set the working directory? Where is your Sqlite DB file? You are just opening a file name, not a pathname so your working directory is whatever your web server uses for CGI data. Francesco Andrisani wrote: Hi comunity, i have the follow problem. I've insert into a C-CGI page a

Re: [sqlite] Problem with sqlite3 on CGI scripts with ANSI C

2006-12-15 Thread Martin Jenkins
Francesco Andrisani wrote: if (sqlite_open("myDB.db", )); The semicolon at the end of this line means your error_handle() will always get called. Martin - To unsubscribe, send email to [EMAIL PROTECTED]

[sqlite] Problem with sqlite3 on CGI scripts with ANSI C

2006-12-15 Thread Francesco Andrisani
Hi comunity, i have the follow problem. I've insert into a C-CGI page a small sqlite3 code. When i call the page from a browser, it exec a query and show on browser the entries, but it don't work. If i add a "printf" above the sqlite3_open() it print the message, but if i put the instruction