[sqlite] FW: Security Problem C/C++

2007-08-06 Thread Severin Müller
Hello I’m trying to use SQLite3 for my File, because I thinks it’s a great API and easy to use. But I’m having trouble to use the library properly. I Have to following Code: void Nickserv::write_nickname(std::string nick,std::string pass,std::string email,User user) { #ifdef _WIN32

[sqlite] Security Problem C/C++

2007-08-06 Thread Severin Müller
Hi I’m trying to use SQLite3 for my File, but I’m having trouble to use the library properly. I Have to following Code: void Nickserv::write_nickname(std::string nick,std::string pass,std::string email,User user) { #ifdef _WIN32 const char *filename = "db\\Nickserv.db";

RE: [sqlite] Security Problem C/C++

2007-08-06 Thread Severin Müller
: Montag, 6. August 2007 22:27 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Security Problem C/C++ Check the result code of sqlite3_open and use the error message from sqlite3_errmsg as the message in your exception. Then you'll know what's wrong. Clay Severin Müller wrote: > Hi > >

[sqlite] C/C++ API

2007-09-05 Thread Severin Müller
Hi I'm new to sqlite3, and i' have some Problems with my code. I'm trying to select data from a table and to save the result in a string. but i have no clue how to accomplish this. Here is a part of my code: std::string get_user_info(const char* nick,int mode) { #ifdef _WIN32 const

Re: [sqlite] C/C++ API

2007-09-05 Thread Severin Müller
qlite3_step(oStmt)==SQLITE_ROW){ > sUsername.assign( sqlite3_column_text(oStmt,1) ); > } > > } > sqlite3_reset(oStmt); > sqlite3_finalize(oStmt); > > sqlite3_close(db); > >

Re: [sqlite] Re: C/C++ API

2007-09-05 Thread Severin Müller
n: "SQLite" <sqlite-users@sqlite.org> > Betreff: [sqlite] Re: C/C++ API > "Severin Müller" <[EMAIL PROTECTED]> wrote: > > This won't work, because sUsername.assign... will not be accepted > > with sqlite3_column_text, because sqlite_column_text if of

Re: [sqlite] Re: Re: C/C++ API

2007-09-05 Thread Severin Müller
Hey Sorry for my unclearness. I want to access information in a sqlite database and store it in a std::string or const char*, so i can return it to the callin function. I have the following code: std::string get_user_info(const char* nick,int mode) { #ifdef _WIN32 const char *filename

Re: [sqlite] Re: Re: C/C++ API

2007-09-05 Thread Severin Müller
as the content of nick, this would assume that you have a > table for each "nick" witch seems unlikely. How is your database modeled? > > Severin Müller wrote: > > Hey > > > > Sorry for my unclearness. I want to access information in a sqlite &

[sqlite] [C] Linker Error

2008-03-08 Thread Severin Müller
Hi folks I tried to include sqlite3 in my current C Project. I downloaded the precompiled library sqlite-3.5.6.so and put it in my project. Then, i downloaded the sqlite source and added sqlite3.h to my project. Now, when i try to compiler, i get the following error message:

Re: [sqlite] [C] Linker Error

2008-03-08 Thread Severin Müller
Hi Folks Thanks for your answers. I already had the latest build, and i linked the lib correctly with my Linker. I found the solution in the meantime. It was quite easy actually: I only had to manually add the -ldl option to my linker and all worked fine. Thanks anyway for your support :)

[sqlite] [C] Problem getting int results

2008-03-12 Thread Severin Müller
Hello Folks I have some problem retrieving a result from a sqlite database in C. I have the following statement: int func(void) { // database is open and the select statement is executed // this is the query: char *sql = "SELECT 'protect' FROM 'test_db');"; struct

Re: [sqlite] [C] Problem getting int results

2008-03-12 Thread Severin Müller
> ""Severin Müller"" <[EMAIL PROTECTED]> wrote > in message news:[EMAIL PROTECTED] > > int func(void) > > { > > // database is open and the select statement is executed > > // this is the query: char *sql = "SELEC

Re: [sqlite] [C] Problem getting int results

2008-03-12 Thread Severin Müller
12 Mar 2008 08:27:47 -0400 > Von: "Igor Tandetnik" <[EMAIL PROTECTED]> > An: sqlite-users@sqlite.org > Betreff: Re: [sqlite] [C] Problem getting int results > ""Severin Müller"" <[EMAIL PROTECTED]> wrote > in message news:[EMAIL PROTE

[sqlite] [C] Getting results doesn't work properly

2008-03-25 Thread Severin Müller
Hi Folks I have the following C funtion: void get_acc(char *src,int ac,char **av) { char *buf = "SELECT accmask FROM testtable;"); sqlite3 *db; struct sqlite3_stmt *oStmt; int rc; if(sqlite3_prepare_v2(db,buf,strlen(buf),,NULL)==SQLITE_OK) {

[sqlite] [C] API: INSERT OR REPLACE

2009-03-27 Thread Severin Müller
Hello I wam writing a program where i need some data. I try to dynamically create a database for this. All my data are stored in a struct, resp. several structs. What I need now, is to know, whether it's possible to check every row I'm submitting for existance, like: row1: data1 data2 data3