MySQL ODBC connection loss

Hi All

I have a problem with connection loss while running a big report. I spoke to MySQL and they gave me a couple of things to check and even gave me the 3.51.13 driver to use but nothing works.

Server: MySQL 5.0.26 (but this happens on all versions, I tested it on 3.23.48)
Win 98 SE (Works fine)
Win 2000 SP 4
Win XP Professional (Tested with firewall on and off)
ODBC 3.51.12 (Tested with “new” 3.51.13 provide by MySQL but also didn’t work)

A brief description of my problem:
The application report we are running in this case is getting invoice vs wage totals and working out the profit we made for every client. It is not just one query running. The App runs with one client and gets the data in
the following way:
1 ODBC connects
2 Only 1 Query runs and brings back the data
3 ODBC disconnects
This happens a couple of times per client because we are looking at a couple of tables and running a couple of queries. After the one client is finished we start with the next client.

On Win 98 the report takes 10-15 minutes and completes. On Win 2000 the report runs for 5 minutes and then gives an error(Connection lost). On Win XP the report runs for 13 seconds and
then gives an error(Connection lost). This is very strange to me because the times that it takes to give errors stays the same on every OS. Does the OS or the ODBC connections have timeout somewhere that will influence the connections?

MySQL’s support engineers don’t know what is going on and I’m now getting frustrated and don’t know what to do.

Please give advice or let me know if you need more info.

Thank you