Re: C api mysql_store_result vs mysql_use_result

2012-02-09 Thread Johan De Meersman
- Original Message - From: Alex Schaft al...@quicksoftware.co.za If I were to do a select count(*) from x where y prior to doing select * from x where y to get a number of records, how would this impact performance on the server itself? Would the first query be the one to do the

Re: C api mysql_store_result vs mysql_use_result

2012-02-09 Thread Alex Schaft
On 2012/02/09 01:40 PM, Johan De Meersman wrote: - Original Message - From: Alex Schaftal...@quicksoftware.co.za If I were to do a select count(*) from x where y prior to doing select * from x where y to get a number of records, how would this impact performance on the server itself?

Re: C api mysql_store_result vs mysql_use_result

2012-02-09 Thread Johan De Meersman
- Original Message - From: Alex Schaft al...@quicksoftware.co.za From the user's perspective, they just need to know the process didn't hang. The count() query is more for getting memory requirements upfront. Can I handle it all, or do I need to break it down into pages? Then just

Re: C API Function for count(*)

2010-05-15 Thread Bob Cole
You might get closer to what you want if you put your command in a text file and run it from the command line. On a Mac OS X, I put a similar command: select count(*) from testTable; into a small text file: testCount.txt and ran this command from the Terminal: mysql -u username

Re: C API Function for count(*)

2010-05-15 Thread Tim Johnson
* Dan Nelson dnel...@allantgroup.com [100514 21:38]: You can't do it with one function call, but you can do it, since the MySQL cli was able to print 16 in your example above, and it was written in C. Take a look at mysql_store_result(), mysql_num_fields(), mysql_field_count(),

Re: C API Function for count(*)

2010-05-15 Thread Tim Johnson
* Bob Cole bobc...@earthlink.net [100515 06:58]: You might get closer to what you want if you put your command in a text file and run it from the command line. On a Mac OS X, I put a similar command: select count(*) from testTable; into a small text file: testCount.txt and ran

Re: C API Function for count(*)

2010-05-14 Thread Dan Nelson
In the last episode (May 14), Tim Johnson said: I have MySQL version 5.0.84 on linux slackware 13.0 32-bit. I am working with a relatively new API written in a programming language with a small user base (newlisp). The newlisp API imports a number of C API functions from the system MySQL

Re: C api - mysql_list_fields

2008-10-07 Thread Joerg Bruehe
Hi Mike, all, Mike Aubury wrote: I'm probably being a bit stupid - but I'm trying to determine (in code) the length of the string in the schema for a given table. So - for example : create table a ( blah char(20) ) I want to return '20', but I'm

Re: C api - mysql_list_fields

2008-10-07 Thread Mike Aubury
Basically - so I can display it in the same form as the orginal table.. Or - if you want the longer version I work with an Opensource project called 'Aubit4GL' (its a clone of Informix4GL - which allows you to write really nice screen based database oriented programs + reports), see

Re: C api - mysql_list_fields

2008-10-07 Thread Joerg Bruehe
Mike, all, Mike Aubury wrote: [[...]] So - the next question is... Is there anyway in code I can find the 'fiddle' factor (1,3,or now possibly 4) that I need to use to divide by to get back to the character width specified in the CREATE TABLE ? In the information_schema database,

Re: C api - mysql_list_fields

2008-10-07 Thread Doug Bridgens
It works for me, I used your code: Field =mycol Type=254 Length=20 so at least your code is fine, and the problem must be somewhere else. I am using RH EL3. cheers, Doug On 6 Oct 2008, at 19:52, Mike Aubury wrote: I'm probably being a bit stupid - but I'm trying to determine (in code)

Re: C api - mysql_list_fields

2008-10-07 Thread walter harms
Mike Aubury schrieb: Excellent - this seems to be the issue - the show create table shows : mysql show create table a\g +---++ | Table | Create Table

Re: C api - mysql_list_fields

2008-10-07 Thread Mike Aubury
Excellent - this seems to be the issue - the show create table shows : mysql show create table a\g +---++ | Table | Create Table

Re: C api - mysql_list_fields

2008-10-07 Thread Simon J Mudd
[EMAIL PROTECTED] (Mike Aubury) writes: I'm probably being a bit stupid - but I'm trying to determine (in code) the length of the string in the schema for a given table. So - for example : create table a ( blah char(20) ) I want to return '20', but I'm

Re: C API routines and cobol

2008-04-25 Thread Warren Young
Michael wrote: Has anyone successfully called the C API routines for MySQL from COBOL? Dude, April 1 was, like, a month ago now. You may have better luck finding an ODBC bridge for your COBOL environment, which let you access MySQL indirectly. -- MySQL General Mailing List For list

Re: C API - Mysql 5

2006-10-25 Thread Gabriel Linder
Hello, Did you try to convert the .lib file to a GCC .a library ? See http://mingw.org/mingwfaq.shtml#faq-msvcdll If reimp doesn't work, you can try pexports and dlltool. I have an old batch file I used for older MySQL versions at http://athanatos.free.fr/EXE/implib.bat [EMAIL

Re: C API - Language Setup and MyISAM table setup

2005-08-22 Thread Warren Young
Fábio Emilio Costa wrote: I'm working in a project in C++ using MySQL C API (Win98/Dev-C++ 4.9.9.8/MySQL DevPak/MySQL 4.1.13) and I want to know if it's possible to setup the server environment language (--language) via mysql_options() function. It seems that you are actually asking whether

Re: C API : Problem using multi-statements

2005-05-06 Thread Jeremiah Gowdy
Answer is simple. Can't do that. - Original Message - From: [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, May 06, 2005 5:40 AM Subject: C API : Problem using multi-statements Hello, I have some problems using multiple queries in a databased driven project, therefore I wrote

RE: C API : Problem using multi-statements

2005-05-06 Thread Reggie Burnett
Jeremiah I don't use the client library in my work but this should work from 4.1 on. -Reggie -Original Message- From: Jeremiah Gowdy [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 11:19 AM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: C API : Problem using

RE: C API : Problem using multi-statements

2005-05-06 Thread Javier Diaz
: Re: C API : Problem using multi-statements Answer is simple. Can't do that. - Original Message - From: [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, May 06, 2005 5:40 AM Subject: C API : Problem using multi-statements Hello, I have some problems using multiple queries

Re: C API : Problem using multi-statements

2005-05-06 Thread Jeremiah Gowdy
doh! need another redbull. :) - Original Message - From: Reggie Burnett [EMAIL PROTECTED] To: 'Jeremiah Gowdy' [EMAIL PROTECTED]; [EMAIL PROTECTED]; mysql@lists.mysql.com Sent: Friday, May 06, 2005 9:31 AM Subject: RE: C API : Problem using multi-statements Jeremiah I don't use

Re: C API: Storing is easy; How do you retrieve?

2005-05-03 Thread Philippe Poelvoorde
Matthew Boehm wrote: Hey guys, (Why is there no C API specific list?) I want to write a C application that can take some audio file, store it in MySQL, then at a later date/time (upon request) pull from db and write to temporary file to be streamed. I've got the storing portion of the code down.

Re: C API: Storing is easy; How do you retrieve?

2005-05-01 Thread Karam Chand
The docs should have it. Basically these API is what you require (in order): mysql_init(); mysql_real_connect(); mysql_real_query(); mysql_store_result() or mysql_use_result(); mysql_fetch_row(); mysql_free_result; mysql_close (); HTH --- Matthew Boehm [EMAIL PROTECTED] wrote: Hey guys,

Re: C api incompatability from 3.x to 4.1

2004-11-10 Thread V. M. Brasseur
I provided the list below for our programmers, who also are dealing with a switch from 3.23 to 4.1. Perhaps it would be of some help for you. Cheers, --V - We've already hit a couple of API-related problems with the new version of MySQL. To try to make things a little easier, and

Re: C api incompatability from 3.x to 4.1

2004-11-10 Thread Dan Nelson
In the last episode (Nov 10), Dave Dyer said: I have a family of applications which use the C api to access mysql. I found by doing a test upgrade to 4.1 that all of these applications crash, apparently because the structures passed between my applications and libmysql.dll are incompatible.

Re: c api and creating looped queries

2004-08-28 Thread Aftab Jahan Subedar
I have arranged some MySQL C API examples at http://www.geocities.com/jahan.geo/mysql_c_by_example.html Larry Brown wrote: On Sat, 2004-08-28 at 00:48, I wrote: I know this is more along the lines of a c question; however, I am trying to write a loop to iterate insertions into a mysql database and

Re: c api and creating looped queries

2004-08-27 Thread Larry Brown
On Sat, 2004-08-28 at 00:48, I wrote: I know this is more along the lines of a c question; however, I am trying to write a loop to iterate insertions into a mysql database and was hoping someone would have a quick fix for this. I am used to using php with the luxury of the following syntax

Re: C API: mysql_options and mysql_real_connect

2004-08-12 Thread V. M. Brasseur
Paul DuBois wrote: At 13:03 -0700 8/11/04, V. M. Brasseur wrote: Assuming a my.cnf file which looks like this: [client] port=3306 socket=/path/to/mysql.sock [app] user=appuser password=apppwd host=my.host.com Ignore for now the insecurity of putting a password in the my.cnf file.

Re: C API: mysql_options and mysql_real_connect

2004-08-12 Thread Paul DuBois
At 8:06 -0700 8/12/04, V. M. Brasseur wrote: Paul DuBois wrote: At 13:03 -0700 8/11/04, V. M. Brasseur wrote: Assuming a my.cnf file which looks like this: [client] port=3306 socket=/path/to/mysql.sock [app] user=appuser password=apppwd host=my.host.com Ignore for now the insecurity

Re: C API: mysql_options and mysql_real_connect

2004-08-12 Thread V. M. Brasseur
Paul DuBois wrote: At 8:06 -0700 8/12/04, V. M. Brasseur wrote: Paul DuBois wrote: At 13:03 -0700 8/11/04, V. M. Brasseur wrote: Assuming a my.cnf file which looks like this: [client] port=3306 socket=/path/to/mysql.sock [app] user=appuser password=apppwd host=my.host.com Ignore for

Re: C API: mysql_options and mysql_real_connect

2004-08-12 Thread Paul DuBois
At 14:40 -0700 8/12/04, V. M. Brasseur wrote: Paul DuBois wrote: At 8:06 -0700 8/12/04, V. M. Brasseur wrote: Paul DuBois wrote: At 13:03 -0700 8/11/04, V. M. Brasseur wrote: Assuming a my.cnf file which looks like this: [client] port=3306 socket=/path/to/mysql.sock [app] user=appuser

Re: C API: mysql_options and mysql_real_connect

2004-08-11 Thread Paul DuBois
At 13:03 -0700 8/11/04, V. M. Brasseur wrote: Assuming a my.cnf file which looks like this: [client] port=3306 socket=/path/to/mysql.sock [app] user=appuser password=apppwd host=my.host.com Ignore for now the insecurity of putting a password in the my.cnf file. This is mostly a

Re: C API 3.23 to 4.1

2004-07-06 Thread Jeremy Zawodny
On Tue, Jul 06, 2004 at 03:40:02PM -0700, Ron Gilbert wrote: I am going to upgrade my MySQL server from 3.23 to 4.1, but I have a C program that needs to continue to connect to the new server, and it can't be recompiled. Is the old API 100% backwards compatible with a 4.1 server? I assume

Re: C API -- huge result sets slowin me down

2004-07-01 Thread Egor Egorov
Matt Eaton [EMAIL PROTECTED] wrote: Try to profile application from that point ... if (mysql_real_query(dbase,sqlBuff,strlen(sqlBuff))) { printf(Pool Attributes Select Failed... dumbass\n); fprintf(stderr, Error: %s\n,

Re: C API -- huge result sets slowin me down

2004-06-29 Thread Dobromir Velev
Hi, The only thing that could slow you down is that the genAttrib array will take more and more memory as the result set grows. I would recommend you to create a function that uses the mysql row directly instead of creating this huge array. something like while ((row =

Re: C api: core dump on mysql_real_connect

2004-02-26 Thread Cliff Addy
On Wed, 25 Feb 2004, Sasha Pachev wrote: where dbh is a global MYSQL structure. This code works fine on the old system. If I pull it out into it's own little test program on the new server, it also works fine. But when I put it in with the analog source code, it compiles fine but

Re: C api: core dump on mysql_real_connect

2004-02-26 Thread Sasha Pachev
Cliff Addy wrote: On Wed, 25 Feb 2004, Sasha Pachev wrote: where dbh is a global MYSQL structure. This code works fine on the old system. If I pull it out into it's own little test program on the new server, it also works fine. But when I put it in with the analog source code, it compiles

Re: C api: core dump on mysql_real_connect

2004-02-25 Thread Sasha Pachev
Cliff Addy wrote: I've got on that really has me stumped ... I've modified tha analog web stats program before to use a mysql database before and I'm trying to do it again on a new system. I have this function: void db_connect(){ printf(start connect\n); mysql_init(dbh); if

Re: C API: undefined reference

2003-11-12 Thread hAj
Thanx so much! mysql_real_connect() certainly works. Best, hAj on 2003.11.11 17:55, Nick Gaugler at [EMAIL PROTECTED] wrote: http://www.mysql.com/doc/en/mysql_connect.html This function is deprecated. It is preferable to use mysql_real_connect() instead. #includestdio.h

RE: C API

2003-11-12 Thread Brad Teale
There is a C++ package called OTL (http://otl.sourceforge.net/home.htm). It supports both MySQL through MyODBC, and Oracle. It works great with Oracle applications, but we have not used it with MySQL. Thanks, Brad Teale Universal Weather and Aviation, Inc. mailto:[EMAIL PROTECTED] 713-944-1440

RE: C API: undefined reference

2003-11-11 Thread Nick Gaugler
http://www.mysql.com/doc/en/mysql_connect.html This function is deprecated. It is preferable to use mysql_real_connect() instead. #includestdio.h #includemysql.h int main(void) { MYSQL mysql; if(mysql_init(mysql) == NULL) { fprintf(stderr,Unable to initlize MySQL

Re: C API: undefined reference

2003-11-11 Thread Aftab Jahan Subedar
alright. looking at your directory this should be ok. gcc seeLog.c -o seeLog -I/usr/include -L/usr/lib/mysql -lmysqlclient ;) Aftab Jahan Subedar Subedar Technologies Subedar Baag Bibir Bagicha #1 North Jatrabari Dhaka 1204 Bangladesh sms://+447765341890 tel://+88027519050 [EMAIL PROTECTED]

Re: C API first row not being returned from a query

2003-10-27 Thread Santino
I use : numRows = mysql_num_rows( Result); numFields = mysql_num_fields( Result); for( j=0; j numRows; j++) { mysql_data_seek( Result, j); CurrentRow = mysql_fetch_row( Result); for( k = 0; k numFields; k++)

Re: C API first row not being returned from a query

2003-10-27 Thread Carl B. Constantine
* Santino ([EMAIL PROTECTED]) wrote: I use : numRows = mysql_num_rows( Result); numFields = mysql_num_fields( Result); for( j=0; j numRows; j++) { mysql_data_seek( Result, j); CurrentRow = mysql_fetch_row( Result);

Re: C API

2003-10-22 Thread Gelu Gogancea
Hi, You can not use native MYSQL C API to handle Oracle DataBase.Work very well (mixed with MYSQL C API) the ORACLE C API which is named OCI(Oracle Call Interface). Regards, Gelu _ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL

RE: C API

2003-10-21 Thread Brad Teale
There is a C++ package called OTL (http://otl.sourceforge.net/home.htm). It supports both MySQL through MyODBC, and Oracle. It works great with Oracle applications, but we have not used it with MySQL. Thanks, Brad Teale Universal Weather and Aviation, Inc. mailto:[EMAIL PROTECTED] 713-944-1440

Re: C API

2003-10-21 Thread walt
Priyanka Gupta wrote: Is there a way to have a common C API for MySQL and Oracle. I am writing some software that I would like to work with both MYSQL or Oracle as the backend server? priyanka _ Enjoy MSN 8 patented spam

Re: C API

2003-10-21 Thread Hardik Doshi
Hi Priyanka, BTW, which programming language you are using? In PHP there is a PEAR DB utitlity which acts as the database abstraction layer. Regards, Hardik Doshi walt [EMAIL PROTECTED] wrote: Priyanka Gupta wrote: Is there a way to have a common C API for MySQL and Oracle. I am writing

Re: C API

2003-10-20 Thread Paul DuBois
At 20:14 -0400 10/20/03, Priyanka Gupta wrote: Is there a way to have a common C API for MySQL and Oracle. I am writing some software that I would like to work with both MYSQL or Oracle as the backend server? The C API for MySQL is specific only to MySQL. You'd have to write your own

Re: C API AND MYSQL

2003-08-02 Thread Andy Jackman
Dave, The documentation has several examples. Here's a function we use. Are you having a particular difficulty? Regards, Andy. snip MYSQL *aDb = NULL; int xConnect() { #define MYSQL_HOST 192.168.103.112 // or host name #define MYSQL_DBfoodb // database

Re: C API Query Semantics

2003-06-19 Thread gerald_clark
Look at the source for the mysql client. It is a perfect example. Sean Macmillan wrote: Using the C API I have written a program that calls mysql_query() on a table with values I know to be in the table. It returns fine and I then call mysql_store_result. The problem I am having is figuring

Re: C API - mysql_free_result

2003-06-19 Thread Paul DuBois
At 13:36 -0400 6/19/03, Adam Lawrence wrote: Stats: MySQL 4.0.13, under Windows98, using the C API with lcc-win32. Is there any way to determine if mysql_free_result() has been called on a result set pointer? There's no API function for that, no. Occasionally I recycle the pointer (use it, free

RE: C API - mysql_free_result

2003-06-19 Thread Twibell, Cory L
After I use mysql_free_result(), I immediately set the resultset to NULL. -Original Message- From: Adam Lawrence [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 11:36 AM To: [EMAIL PROTECTED] Subject: C API - mysql_free_result Stats: MySQL 4.0.13, under Windows98, using the C

Re: C API

2003-06-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-03 18:45:31 +0200: Executing gcc.exe... gcc.exe U:\mep\Dev\abr.c -o U:\mep\Dev\abr.exe -IC:\Dev-Cpp\include -IC:\mysql\include -LC:\Dev-Cpp\lib C:\DOCUME~1\badier1\LOCALS~1\Temp/ccW8.o(.text+0x1d2):abr.c: undefined reference to [EMAIL PROTECTED]'

Re: C API

2003-06-04 Thread Paul DuBois
At 18:45 +0200 6/3/03, [EMAIL PROTECTED] wrote: Hello, I'm trying to code a small C client, under windows, with bloddshed Dev-C++, and i always get an error. /* Code */ #include conio.h #include stdarg.h #include winsock.h #include stdio.h #include stdlib.h #include string.h #include mysql.h int

Re: C API

2003-06-04 Thread vze2spjf
From: [EMAIL PROTECTED] Date: 2003/06/03 Tue AM 11:45:31 CDT To: [EMAIL PROTECTED] Subject: C API Hello, I'm trying to code a small C client, under windows, with bloddshed Dev-C++, and i always get an error. /* Code */ #include conio.h #include stdarg.h #include winsock.h

Re: C API

2003-06-04 Thread Vincent . Badier
#include conio.h #include stdarg.h #include winsock.h #include stdio.h #include stdlib.h #include string.h #include mysql.h int main(void) { MYSQL* toto; toto = mysql_init(toto); } /* this is the compler log */ Compiler: Default compiler Executing gcc.exe... gcc.exe U:\mep\Dev\abr.c

Re: C API Question

2003-02-19 Thread Paul DuBois
At 10:57 -0600 2/19/03, William R. Mattil wrote: Hello, I am having some cockpit trouble with the following MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char *wild); and it is like lack of understanding on my part. Syntax is: if (mysql_list_fields( mysql, some table

Re: C API Question

2003-02-19 Thread Paul DuBois
At 11:13 -0600 2/19/03, Paul DuBois wrote: At 10:57 -0600 2/19/03, William R. Mattil wrote: Hello, I am having some cockpit trouble with the following MYSQL_RES *mysql_list_fields(MYSQL *mysql, const char *table, const char *wild); and it is like lack of understanding on my part. Syntax is:

Re: C API Changes?

2003-02-18 Thread ggelu
--- Amy Joseph Kormann [EMAIL PROTECTED] wrote: Are there any (significant) changes in the C API between MySQL 3.X and 4.X? If so, where are they located. Yes.Are some changes between ver 3.x and 4.x.If i understand well i think you try to find where this changes are

Re: C API Changes?

2003-02-18 Thread Stephen Brownlow
ggelu [EMAIL PROTECTED] wrote: --- Amy Joseph Kormann [EMAIL PROTECTED] wrote: Are there any (significant) changes in the C API between MySQL 3.X and 4.X? If so, where are they located. Yes. Are some changes between ver 3.x and 4.x.If i understand well i think you try to find where this

Re: C API Changes?

2003-02-18 Thread Amy Joseph Kormann
Stephen Brownlow wrote: ggelu [EMAIL PROTECTED] wrote: --- Amy Joseph Kormann [EMAIL PROTECTED] wrote: Are there any (significant) changes in the C API between MySQL 3.X and 4.X? If so, where are they located. Yes. Are some changes between ver 3.x and 4.x.If i understand well i

Re: C API Changes?

2003-02-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amy Joseph Kormann wrote: Stephen Brownlow wrote: ggelu [EMAIL PROTECTED] wrote: --- Amy Joseph Kormann [EMAIL PROTECTED] wrote: Are there any (significant) changes in the C API between MySQL 3.X and 4.X? If so, where are they located.

Re: C API for mysql

2003-02-10 Thread Paul DuBois
At 14:21 + 2/7/03, Qin Lu wrote: Hello, I'd like to practice my C application for using mysql. Do you know where can I find some examples? Look in the client directory of a MySQL source distribution. Many/most of the standard MySQL clients are written in C. You can also get examples at

Re: C API problems with InnoDB

2002-12-03 Thread H. Steuer
Hello Mark, thanks for your answer. In fact the mysql shell where I update the row is using AUTOCOMMIT=1. Even after I issue a COMMIT manually the changes are not seen by the application. What I dont understand is that the program doing a SELECT has to issue an COMMIT to have all data available.

Re: C API problems with InnoDB

2002-12-03 Thread H. Steuer
Hi Stefan, Does the second shell actually perform those changes? In this case, I assume it's got something to do with the isolation level / consistent read in InnoDB tables. shell1 sees all its changes immediately, shell2 (the application) has just a snapshot of the data at the time it

Re: C API problems with InnoDB

2002-12-03 Thread Dr. Frank Ullrich
Heri, H. Steuer schrieb: Hi Stefan, Does the second shell actually perform those changes? In this case, I assume it's got something to do with the isolation level / consistent read in InnoDB tables. shell1 sees all its changes immediately, shell2 (the application) has just a

Re: C API problems with InnoDB

2002-12-03 Thread Heikki Tuuri
Heri, - Original Message - From: H. Steuer [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Tuesday, December 03, 2002 11:49 AM Subject: Re: C API problems with InnoDB Hello Mark, thanks for your answer. In fact the mysql shell where I update the row is using AUTOCOMMIT=1

Re: C API problems with InnoDB

2002-12-02 Thread Stefan Hinz, iConnect \(Berlin\)
Dear Heri, I tracked down the problem and saw that its only happening if I set autocommit=0. If I run a second mysql shell I can see all changes immediately. Just the application itself doesnt. Does the second shell actually perform those changes? In this case, I assume it's got something to

Re: C API problems with InnoDB

2002-12-02 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 H. Steuer wrote: Hello MySQL users, I have a weired issue using the MySQL C API and InnoDB tables. An application polls a database every 30 seconds. When the application starts everything seems to be fine. During the running of the application i

Re: C-API and multiple resultsets

2002-10-29 Thread Insanely Great
Greetings... Yes. If you want to traverse two result set in the same time then use the mysql_store_result(). If you don't have a big resultset coming then probably mysql_store_result() in the same connection is a better option. Otherwise you have to use two connections. Rgds Insane SQLyog -

Re: C-API and multiple resultsets

2002-10-29 Thread Stefan Fleiter
Insanely Great wrote: Hi! If you want to traverse two result set in the same time then use the mysql_store_result(). If you don't have a big resultset coming then probably mysql_store_result() in the same connection is a better option. Otherwise you have to use two connections. Thanx, just

Re: C++ API

2002-07-11 Thread Matthew Scarrow
Most likely this will solve your problem. This comes right from the mysql website documentation. It is for the C API but I'm sure the same concepts go for C++ as well. If this doesn't work provide more info on the program you are using for coding and the errors you are getting. Thanks.

RE: C API: mysql_data_seek

2002-07-10 Thread Chan WieVia ICM N MC MI E3 Extern
was made. Please advice and thanks. wv -Original Message- From: Gelu Gogancea [mailto:[EMAIL PROTECTED]] Sent: 09 July 2002 23:03 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED] Subject: Re: C API: mysql_data_seek Hi, It's ok but you must retrieve data from row. int sql_result

Re: C API: mysql_data_seek

2002-07-10 Thread Gelu Gogancea
]; [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 10:13 AM Subject: RE: C API: mysql_data_seek Hi, Thanks for ur reply. When i commented out the mysql_data_seek() function, mysql_fetch_row() returns me a non-NULL value (this should be the first row from the MResult). This results show

RE: C API: mysql_data_seek

2002-07-10 Thread Chan WieVia ICM N MC MI E3 Extern
. Please advice. Once again, thnx for replying. Regards, wv -Original Message- From: Gelu Gogancea [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 09:38 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED] Subject: Re: C API: mysql_data_seek Hi, If i understand well you use twice

Re: C API: mysql_data_seek

2002-07-10 Thread Gelu Gogancea
Extern [EMAIL PROTECTED] To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 11:42 AM Subject: RE: C API: mysql_data_seek Hi Gelu, Thnx for the prompt reply. I called mysql_data_seek() once and I called it before mysql_fetch_row(). With this, mysql_fetch_row

RE: C API: mysql_data_seek

2002-07-10 Thread Chan WieVia ICM N MC MI E3 Extern
-Original Message- From: Gelu Gogancea [mailto:[EMAIL PROTECTED]] Sent: 10 July 2002 11:02 To: Chan WieVia ICM N MC MI E3 Extern; [EMAIL PROTECTED] Subject: Re: C API: mysql_data_seek Hi, If i understand well, mysql_fetch_row() work fine but if you add mysql_data_seek() the row

Re: C API: mysql_data_seek

2002-07-10 Thread Gelu Gogancea
PROTECTED] - Original Message - From: Chan WieVia ICM N MC MI E3 Extern [EMAIL PROTECTED] To: 'Gelu Gogancea' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 3:03 PM Subject: RE: C API: mysql_data_seek Hi Gelu, Yes, you are right in getting my problem. I tried

Re: C API: mysql_data_seek

2002-07-09 Thread Gelu Gogancea
Hi, It's ok but you must retrieve data from row. int sql_result;x,i; MYSQL_RES *MResult; MYSQL_ROW *row; MYSQL *MQuery; char SQLQuery[]; sprintf( SQLQuery, SELECT * FROM Profile ); sql_result = mysql_query(SQLQuery); MResult = mysql_store_result(MQuery);//mysql_store_result return in

Re: C API row data not matching database data

2002-06-14 Thread Paul DuBois
At 19:54 +0200 6/14/02, Hihn Jason wrote: I'm using the C API to return a record which has a field that contains (somewhat) binary data. It's been properly mysql_escape_string()ed. I'm using a 3.23.4x server client. When I do a: select data into outfile 'out' from table where id='1'; from the

Re: C++ API for Mysql

2002-05-06 Thread Hisseine Dj.
Hi Carsten, I've tried Mysql++ and SQLAPI. I am asking if someone out there know about other best tools in C++ for Mysql on linux. Thanks, Hisseine - Original Message - From: Carsten Gehling [EMAIL PROTECTED] To: Hisseine Dj. [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, May 06,

Re: C API

2002-04-18 Thread Ritu Singla
In fact, i'm trying to read data from a binary file and want to insert that into the database. I guess, it would be easier and more efficient if i use some data structure like we have vectors in C++ API. Thanks, Ritu Singla On Thu, 18 Apr 2002, Robert Cross wrote: you wrote: I want

Re: C API question

2002-03-27 Thread Paul DuBois
At 5:09 + 3/28/02, Federico Halperin wrote: In a table, I declared a column which is an integer unsigned. After calling mysql_fetch_row, I need to convert the value of the column (i.e. row[0]) to a string. According to the manual, *all* column values are returned as strings. I'd say you

RE: C API question

2002-03-27 Thread Chetan Lavti
hi, I think u don't need to convert it in to string... all the column values comes out in string only... or even u need to use atoi() Function for getting the Int ot unsigned int... I have used it... Chetan Lavti -Original Message- From: Federico Halperin [mailto:[EMAIL PROTECTED]]

RE: C API question

2002-03-27 Thread Chetan Lavti
hi, I think u don't need to convert it in to string... all the column values comes out in string only... I have used it... Chetan Lavti -Original Message- From: Federico Halperin [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 10:40 AM Subject: C API question In a table, I

RE: C API Question

2002-03-20 Thread Kenneth Hylton
multiple commands Not as far as I know, you need to open your file, read the commands and process them one at a time. The C API is not magic and has no more capability than you do setting down and typing in the commands yourself. What you can do is build one HUGE insert command from lots of

Re: C API Question

2002-03-20 Thread Paul DuBois
At 11:35 + 3/20/02, Javier wrote: Hi, I have a text file , with several MySQL instructions (CREATE TABLE, INSERT, SET @var, etc.). I want to execute all these instructions from a C program , using the API. It is possible to use the function mysql_query(), to execute all the instructions

Re: C API BLOB type field lengths returned

2002-03-07 Thread Paul DuBois
At 16:48 -0600 3/7/02, Kenneth Hylton wrote: Howdy - I've posted this twice before - third time might be the charmer... Can anybody help me? I am using the C API and am returning a result set from a table with a BLOB type item in it. When I populate the BLOB fields initially (with all the same

Re: C API BLOB type field lengths returned

2002-03-07 Thread Arjen Lentz
Hi, Kenneth, On Fri, 2002-03-08 at 08:48, Kenneth Hylton wrote: I've posted this twice before - third time might be the charmer... Can anybody help me? I am using the C API and am returning a result set from a table with a BLOB type item in it. When I populate the BLOB fields initially

Re: C API example code.

2002-02-20 Thread George Labuschagne
Thanks, I will have a look at the official site. Is anybody aware of a non-oficial site that contains an example with a real db as backend. (With real db I mean tables with a few thousand+ records per table and advanced queries with multiple joins) and then how one can optimise the c code to run

Re: C++ API

2002-01-24 Thread Sinisa Milivojevic
Christopher Thompson writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For various reasons, I need a C++ API to MySQL for use in Windows (and possibly Linux as well). I know I can find one or two in the downloads/contrib section but I'm looking for suggestions. I'm quite happy

Re: C++ API on MacOS X 10.1.1

2002-01-18 Thread Sinisa Milivojevic
Chris Allum writes: Hi, I'm trying to use the mysql++ API on MacOS X with Project Builder, but I am not sure what to do to get started. Any suggestions? Thanks, - Chris -- Christopher Allum [EMAIL PROTECTED]

RE: C-API Query

2002-01-07 Thread John Lodge
Hello, I have corrected the code as I would have written it. Also are you sure the file mysql.h is where you think it is? #include stdio.h #include mysql/mysql.h main() { int sel; MYSQL mysql=NULL; MYSQL *connection; MYSQL_RES *result; mysql_init(mysql);

Re: C-API Query

2002-01-07 Thread Aigars Grins
Hi, [..] produces the following error messages. /tmp/ccPhnnJk.o: In function `main': /tmp/ccPhnnJk.o(.text+0x14): undefined reference to `mysql_init' /tmp/ccPhnnJk.o(.text+0x5a): undefined reference to `mysql_real_connect' /tmp/ccPhnnJk.o(.text+0x6d): undefined reference to `mysql_query'

Re: C API problem, CREATE TABLE SELECT SELECT

2001-11-23 Thread Attila Soki
| query_len = sprintf(query, CREATE TEMPORARY TABLE temp SELECT ); try it out with asprintf(). but you have to define at compile time the following -D_GNU_SOURCE maybe you allocates not enough place for query. asprintf do it for you. char *query; int query_len;

Re: C API mysql_query() malfunctioning (long)

2001-11-12 Thread M. A. Alves
So you mean to replace joining with combined condition? I think it is simply a terminological/syntactical difference. I simply never use LEFT JOIN commands. I always use '='. I think they do the same think, namely what is called a join in relational _theory_. I *understand* '=' better then

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread M. A. Alves
I know KR (section 4.9, 2nd ed.) says char s[] = ...; is equivalent to char s[] = { . . . , '\0'} but I always explicitely attach the \0 just to be sure i.e. char s[] = ...\0; /* mysql, database (cheating the filter, human reader ignore) */ -- , M A R I O data miner, LIACC,

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread brainheap
M. A. Alves wrote: My testing returns 16 rows in both ways (program using API vs. mysql monitor). I have copied verbatim the query string from your C code (it was the query constant right?) I think this contrasts with your results no? yes when I typed in the same query in mysql I get

Re: C API mysql_query() malfunctioning (long)

2001-11-09 Thread brainheap
M. A. Alves wrote: I think the problem is in your query expression. I have reformulated your original query using my style and that consistently results in 4 rows which I think is what you wanted. Original_Query : String := select distinct Exhibition.InternalNumber,Exhibition.Name,

  1   2   >