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

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
aabudara
Posts: 3
Joined: Wed 19 Jul 2006 01:31

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

Post by aabudara » Sun 19 Nov 2006 03:18

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.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 20 Nov 2006 07:57

Please describe in detail what exactly you need or what is the problem.

aabudara
Posts: 3
Joined: Wed 19 Jul 2006 01:31

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

Post by aabudara » Mon 20 Nov 2006 15:47

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.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 21 Nov 2006 10:00

Unfortunately, it is not possible to use connection strings from app.config in MySqlDataAdapter in design-time.

StuartLeitch
Posts: 9
Joined: Thu 24 Nov 2005 03:06

Post by StuartLeitch » Tue 21 Nov 2006 22:09

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?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 22 Nov 2006 08:03

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.

Post Reply