Page 1 of 1

Cannot Use .config or my.settings in mysqlconnection in GUI

Posted: Sun 19 Nov 2006 03:18
by aabudara
We are not being able to use my.settings or a connection string in the app.config file when we define a mysqlconnectionstring using the GUI.
Is there a way to do that, or a workaround ?

We are using MySQL Direct.NET Version 3.50.11.0


Thanks in advance ..


Best Regards,

Alberto Abudara.

Posted: Mon 20 Nov 2006 07:57
by Alexey
Please describe in detail what exactly you need or what is the problem.

Cannot Use .config or my.settings in mysqlconnection in GUI

Posted: Mon 20 Nov 2006 15:47
by aabudara
I have the connectionstring in the app.config file for all the application.

We have a .NET component, where we have a dataadapter and dataset we include in the designer.
It requires us to define the connection and creates a mysqlconnection object, but it has the connection string in it, we want the mysqlconnection object obtain the connectionstring from the config file.
We can do it by hand modifying the designer, but if we make changes to the dataadapter, we have to change again by hand everything !!

I hope is more clear the problem now.

Regards,
Alberto.

Posted: Tue 21 Nov 2006 10:00
by Alexey
Unfortunately, it is not possible to use connection strings from app.config in MySqlDataAdapter in design-time.

Posted: Tue 21 Nov 2006 22:09
by StuartLeitch
Does this mean that you can't use the MySQLDirect design surface components at all without hard-coding the connection string? Given that hard-coding connection strings is one of the worst things you can do as a developer, do you recommend avoiding the use of the design surface?

Are you able to use the my.settings rather than app.config?

Posted: Wed 22 Nov 2006 08:03
by Alexey
We will consider your suggestions.
We are planning to add app.config support into connection string editor.
Also we are going enhance ConnectionString code serialization.