Problem with C API

2005-07-26 Thread picoman
Hi all, i try to use the C API but i get a segmentation fault... my code looks like : MYSQL mysql; if( ! mysql_init(mysql) ) exit(0); if( ! mysql_real_connect(mysql,localhost,user,xxx,,3306,NULL,0) ) exit(0); if( mysql_select_db(mysql, nomBdd) != 0 ) exit(0); mysql_query(mysql,SELECT

Re: Problem with C API

2005-07-26 Thread picoman
Sorry to disturb you, i have resolved my problem by using other mysql headers! Selon [EMAIL PROTECTED]: Hi all, i try to use the C API but i get a segmentation fault... my code looks like : MYSQL mysql; if( ! mysql_init(mysql) ) exit(0); if( !

Problem with C API and mysql

2001-06-05 Thread kenneth johansen
hello everybody. Ive been working with perl and mysql for some time, but recently i had to move over to C and as such i wrote a small test program, just to get to know the mysql C API. Well, things didnt go as i thought. i kept getting linking problems and in the end my test program was limited

Re: Problem with C API and mysql

2001-06-05 Thread Gerald Clark
kenneth johansen wrote: } + i compile this with: gcc -I/usr/local/mysql/include/ -L/usr/local/mysql/lib/ program.c -lmysqlclient add -lz -- Gerald L. Clark [EMAIL PROTECTED]

Re: Problem with C API and mysql

2001-06-05 Thread Sinisa Milivojevic
kenneth johansen writes: hello everybody. Ive been working with perl and mysql for some time, but recently i had to move over to C and as such i wrote a small test program, just to get to know the mysql C API. Well, things didnt go as i thought. i kept getting linking problems and in the

Re: compiler problem with C++ API

2001-04-16 Thread Sinisa Milivojevic
[EMAIL PROTECTED] writes: Hello, When using Visual C++ or Delorie DJGPP (under windows 2000) compilers and compiling the following example: #include iostream #include winsock.h #include windows.h #include iomanip #include mysql++ int main() { Connection con("stw");

compiler problem with C++ API

2001-04-15 Thread mysqlweenie
Hello, When using Visual C++ or Delorie DJGPP (under windows 2000) compilers and compiling the following example: #include iostream #include winsock.h #include windows.h #include iomanip #include mysql++ int main() { Connection con("stw"); return 0; } I always get the

Insert Problem in C API

2001-04-12 Thread Shambhu Kumar singh
Hi, I am running a query using C APIs to insert a large text item into a MySQL table. The query is as follows sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Re: Insert Problem in C API

2001-04-12 Thread Aigars Grins
sprintf(szQuery,"Insert into mytable(mycol)values '%s' ", mydata); where mydata is a C variable containing a large text item The problem occurs when mydata contains a single quote, then that single quote is taken as the end of the column value by the MySQL parser

Problem with C API : LINK 'libmysqlclient.a'

2001-02-08 Thread brahim mebtouche
Hi, Sorry for my stupid question, I have probleme when i use C API : LinK Problem. MY COMMAND : bashgcc -o fic.ex NA_PEC_Sin.c -L/usr/local/REP-MYSQL/mysql-3.23.32-pc-linux-gnu-i686/lib -lmysqlclient (the 3 lignes represent 1 ligne for my command ) ERROR MESSAGE