Strange connection string persistence issue

I’m connecting to a MySQL database using a third party component (MySQLDirect).  The issue I’m having does not seem to be a bug in the third party component as no other users are reporting issues with it and they seem unable to help.  I would really appreciate if someone could give me some inspiration on how else I can think about tracking this issue down.

< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 

The weird issue is:

 

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.  Any help would be greatly appreciated!



Answer this question

Strange connection string persistence issue

  • comunic8

    I've now resolved this issue.  It turned out that the SQL generated by the designer included the database name and thus overrode the connection string database. 
  • KidFromBrnx

    Well, considering that I am lacking the particulars I will take a blind stab at it. Firstly and most importantly you should set up some breakpoints and step through the code, you claimed you already did that, so it looks like you got the basics covered.

    Since you are working with a component, I would make sure that once I got a clean build, to throw the dll's into the GAC. That will ensue that the latest build is being accessed by the component.

    Outside of that I can only speculate that if your code is up to snuff then you are looking at a config error of some sort.

    Best of luck.

  • Strange connection string persistence issue