Re: MySQL C API multiple connections

2001-01-13 Thread Sinisa Milivojevic
alex writes: > > > > By the way it seems to me that in 3.23.XX series mysql_init() returns address not > of the starting point of the allocated memory pool but a point somewhere further > (like to provide hidden data not included in "official" MYSQL structure). Hence > when trying to use

Re: MySQL C API multiple connections

2001-01-12 Thread alex
Sinisa Milivojevic wrote: > > Hi! > > I made an error in my previous message. All three instances should be > like this: > > connX = mysql_init(NULL); > if (!mysql_real_connect(connX, ip2, user2, pass2, db2, 0, NULL, 0)) > error . > By the way it seems to me that in 3.23.XX series mys

Re: MySQL C API multiple connections

2001-01-12 Thread Sinisa Milivojevic
Valerio Ferrucci writes: > John Dean wrote: > > > Hi > > I think you should check the API documentation > > Can you point me to some docs about this? > > > because you code example is > > wrong. Each connection should have its own initialized connection handle. > > You have only initi

Re: MySQL C API multiple connections

2001-01-12 Thread Sinisa Milivojevic
Valerio Ferrucci writes: > Hi, > I'm building a MySQL C API client. I need to connect to different dbs > at the same time. My code is (approximately): > > // > MYSQL mysql, *conn1, *conn2; > > mysql_init(&mysql) > > conn1 = mysql_real_connect(&mysq, ip1, u

RE: MySQL C API multiple connections

2001-01-12 Thread Narvaez, Teresa
erio Ferrucci [SMTP:[EMAIL PROTECTED]] > Sent: Friday, January 12, 2001 8:32 AM > To: [EMAIL PROTECTED] > Subject: MySQL C API multiple connections > > Hi, > I'm building a MySQL C API client. I need to connect to different dbs > at the same time. My code is (app

Re: MySQL C API multiple connections

2001-01-12 Thread Valerio Ferrucci
John Dean wrote: > Hi > I think you should check the API documentation Can you point me to some docs about this? > because you code example is > wrong. Each connection should have its own initialized connection handle. > You have only initialized one data structure i.e. mysql, which is passed >

MySQL C API multiple connections

2001-01-12 Thread Valerio Ferrucci
Hi, I'm building a MySQL C API client. I need to connect to different dbs at the same time. My code is (approximately): // MYSQL mysql, *conn1, *conn2; mysql_init(&mysql) conn1 = mysql_real_connect(&mysq, ip1, user1, pass1, db1, 0, NULL, 0) printf("conn1 = %d", con