However as part of the code, I'm having to create a new MySqlConnection object to open the target database. As the package already contains a connection manager to the database, is it possible to make use of this without having to create a new one?
Code: Select all
MySqlConnection mySqlConnx = (MySqlConnection)Connections.Connection;
Code: Select all
Unable to cast COM object of type 'System.__ComObject' to class type 'Devart.Data.MySql.MySqlConnection'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
Code: Select all
MySqlConnection mySqlConnx = new MySqlConnection(Connections.Connection.ConnectionString);
mySqlConnx.Password = "***";
Thanks.