Strange connection string persistence issue

Strange connection string persistence issue

Postby StuartLeitch » Thu 24 Nov 2005 03:31

I’ve come across a weird issue:

I have my MySQL database connection string in the app.config file. I’m using the MySQLDirect components in a component designer using VB.Net 2005. When I change the database name in the config file to another database, the data is pulled from the original database. I can step through the InitializeComponent Sub and confirm that the correct string is being retrieved from the config file and the connectionstring of the select command of the dataadapter is correct.

If I create a new connection and dataadapter component on the same component using the new database connection string set directly in the properties window, I still get data from the old database.

However, if I create a new form with a new connection and dataadapter component, the data comes from the new database.

I’m stumped as to where I should go from here. I searched this forum and didn’t see any references to this problem, so I presume it is something to do with my implementation. I’m using the latest version of the 2005 version of MySQLDirect but I have also replicated the problem in the same project in VS2003 using MySQLDirect version 2.7.

Any help would be greatly appreciated!
StuartLeitch
 
Posts: 9
Joined: Thu 24 Nov 2005 03:06

Postby Serious » Thu 24 Nov 2005 09:19

We tested this behavior and found no problems.
Please make sure that command text in the DataAdapter does not include database name.
If it does not, send us small test project if possible to reproduce the problem; it is desirable to use 'test' schema objects, otherwise include definition of your own database objects. Do not use third party components.
Use e-mail address provided in registration letter.
Serious
 

Issue Resolved

Postby StuartLeitch » Mon 28 Nov 2005 04:49

Thanks Serious. It was as simple as the command text including the database name. I'd not thought to check. Thanks :D
StuartLeitch
 
Posts: 9
Joined: Thu 24 Nov 2005 03:06


Return to dotConnect for MySQL