Hi !
I try to access a MySql Database by using
VisualBasic (VB6) via ODBC
When I wrote a little VB programm to access mySql
and test the program on the same computer were the MySql
server is running, everything is OK and the databse access is
very fast.
The next step was to install the client application on a Win98 computer.
When I start the VB application there, the data access is very slow.
After some test I found out that the client needs more than 10 seconds to
open
the connection.
Also I found out that when I use the ODBC "test" function it needs more
than 10
seconds (sometimes 20sec) to establish a connection.
I test the same client application using a laptop running WinXP Prof. SP1.
On
this laptop the application was also very slow.
Originally my VB application uses following structure:
sub Event()
Dim conn As New ADODB.Connection
conn.CursorLocation = adUseClient
conn.ConnectionString =
"PROVIDER=MSDASQL;dsn=myAdr;uid=myODBC;pwd=xxxx;database=my
Data;"
conn.open
DO the SQL stuff !!!!
conn.close
end sub
I change the structure that I have a global connection object that is
connected
when the form is loaded and closed if the form is unloaded.
That the performes of the mySql access is fast.
But I want to open a connection only when it is needed and want to close
the
connection soon as possible.
So my question is, how the time to establish the connection of about
20sec can be reduced ?
Maybe I have to reconfigure the server (e.g. change the network name)
(Remark: the ODBC debug options were already disabled!)
MySql Information:
-------------------
MySql Version: 4.1.11-max viaTCP/IP
Networkname: localhost
IP: 127.0.0.1
LAN Structure:
--------------
10MBit Hub
1 Laptop running WinXP Home SP2
1 Laptop running WinXP Prof. SP1
1 desktop running Win98 SE
Laptop with MySql-Server:
-------------------------
WinXp Home + SP2
256MB Memory
10MBit Ethernet Connection
Desktop with client application:
--------------------------------
Win98Se
512MB Memory
10MBit Ethernet Connection
MySql ODBC 3.51 Driver (MyODBC-3.51.11-2-win)
Laptop with client application:
--------------------------------
WinXP Prof. SP1
512MB Memory
10MBit Ethernet Connection
MySql ODBC 3.51 Driver (MyODBC-3.51.11-2-win)
Thanks
Wolfgang Gertzen