jennyflower
Programmer
Hi, I am wondering how easy you rekon it would be to set up an application which allows a user to switch between say an SQL Server database and a MySQL database so if the user wants to use MySQL instead of SQL Server they can easily set this up.
I have tried doing it all programmatically but have been told this would take tons of coding and time if I wanted to bind textboxes etc to a data adapter/data source and as the .net providers for these 2 databases have different commands (e.g. sqlconnection and mysqlconnection) for all the different sql things you can do, there are either going to be lots of ifs or it will a case of writing multiple functions and classes which are identical but one is mysql based and one is sql server based. right?
I have also tried to do it using the drag and drop data tools in vs2005 but this seems to have the same sort of problems and doing this programmatically, i.e. the commands are different so there are still going to have to be different classes and functions to make each database work correctly depending on which one is chosen. But using the drag and drop components also seems to have to added problem that as everything is set when the application / form loads the databindingsource and table adapters need to be altered on load depending on what database backend is being used which means using ifs and possibly more functions and classes need to be written.
If any one managed to understand that (!!!) is there going to be a simple way of getting this to happen or is it going to be very complicated and time consuming to do whatever method is chosen
Thanks!
I have tried doing it all programmatically but have been told this would take tons of coding and time if I wanted to bind textboxes etc to a data adapter/data source and as the .net providers for these 2 databases have different commands (e.g. sqlconnection and mysqlconnection) for all the different sql things you can do, there are either going to be lots of ifs or it will a case of writing multiple functions and classes which are identical but one is mysql based and one is sql server based. right?
I have also tried to do it using the drag and drop data tools in vs2005 but this seems to have the same sort of problems and doing this programmatically, i.e. the commands are different so there are still going to have to be different classes and functions to make each database work correctly depending on which one is chosen. But using the drag and drop components also seems to have to added problem that as everything is set when the application / form loads the databindingsource and table adapters need to be altered on load depending on what database backend is being used which means using ifs and possibly more functions and classes need to be written.
If any one managed to understand that (!!!) is there going to be a simple way of getting this to happen or is it going to be very complicated and time consuming to do whatever method is chosen
Thanks!