|
-
Sep 19th, 2012, 03:26 PM
#1
Thread Starter
Addicted Member
MySQL and VB6
Hi All
I am using the following connection string:
Code:
ConnectionString = Driver={MySQL ODBC 5.1 Driver};Server=XXXX;Port=3306;Database=XXXX;User=XXXX; Password=XXXX;Option=3;
Which works fine.
If the MySQL database server is not there, the VB6 application opens the MySQL Connector window.
Is there any way I can trap/prevent this and handle the error myself ie msgbox/shut down app etc?
Thanks
Paul
-
Sep 19th, 2012, 03:54 PM
#2
Re: MySQL and VB6
It would be better if you post the whole open procedure
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
Sep 19th, 2012, 04:10 PM
#3
Thread Starter
Addicted Member
Re: MySQL and VB6
Well...... Thats where I am lazy really.....
I am using the Data Environment and do the following:
Code:
DE1.Conn1.ConnectionString = gStrConnectionString
DE1.Commands("Fire").CommandText = "SET SESSION wait_timeout=86400"
DE1.Commands("Fire").Execute
Does this make things any clearer?
Paul
-
Sep 19th, 2012, 07:00 PM
#4
Re: MySQL and VB6
AFAIK
If we use data environment to connect to a data provider it will use its own error handling and that's why it is asking for new credentials to establish connection again
If we use our own code we will be able to handle the error...
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
-
Sep 21st, 2012, 06:15 PM
#5
Thread Starter
Addicted Member
Re: MySQL and VB6
Does this mean that I have no way of trapping the error then?
-
Sep 21st, 2012, 09:03 PM
#6
Re: MySQL and VB6
That's my opinion, but I haven't much experience with data environment
Let's see if there're others' opinion
Last edited by jggtz; Sep 21st, 2012 at 09:07 PM.
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|