Ronny,

Oops, no I didn't.

Odd that my code (which looks very similar to your code) has no problems but
your code does.  Has to be something in your code (always work from
something that works to something that doesn't.)  Is there any way you can
subset your code to just a few lines to get it to work and then expand it to
what you really want to accomplish?  Can you run a debugger on it to make
certain what you think is happening is really what is happening?

Thanks,

Carl

----- Original Message -----
From: "Ronny Melz" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Monday, June 06, 2005 3:58 AM
Subject: Re: Re: sleeping processes


>
> Hi Carl,
>
> thank you for your reply.
> did you have a look at my original posting where I included the code?
>
> your code (omitting the error routines) is essentially like this:
> sock=mysql_init(0))
> mysql_real_connect(sock,ipNumber,userName,password,gvDatabase,3306,NULL,0)
> mysql_select_db(sock,gvDatabase)
> // possibly looped
> mysql_real_query(sock, query, strlen(query))
> mysql_free_result(tableRes);
> // eoloop
> // At the end of the program, I close the socket.
>
> > 1.  I don't open a connection for each query, using the already open
socket
> > instead (good for some things, not good for other ones.)
> >
> > where in your code are you closing the connection?
> I tried both: to embrace the query/free_result into mysql_init/mysql_close
> commands within the loop as well as doing the mysql_init/mysql_close at
the
> beginning and at the end of the program. (just as you do and as I posted
in
> my first message)
>
> > 2.  You have to free the result set after every select.
> I free the result set after every select until NULL.
>
> hmmm...
>
> anyway many thanks,
> Ronny
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 6/4/2005
>
>



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 6/4/2005


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to