Anyway of achieving DB independace with the Dataset designer in vs2005?

  • Thread starter Thread starter Mike Davies
  • Start date Start date
M

Mike Davies

Hi All,

I have just discovered the dataset designer in Visual Studio 2005 and
really love it. It makes it a piece of cake to produce a DAL to the
DB. But I was wondering, when I create a table adapter I have to give
it the connection type. Ie SQLClient, ODBC etc. This mean that if I
want to change from say SQL to ODBC I will have to recreate the table
adapters as I can't just change the connection type as it brings up
loads of errors.

|s there anyway I can achieve Database independance using this tool. In the past I have use the IDBAdapter and factory methods to do this but because it is auto generated I can;t do it this way anymore.

Thanks,

Mike
 
Hi,


You can probably change the Connection property of the Table Adapter if
the two targeted db have the same schema. I mean, if you have two
"identical" db on MS SQL Server, but one for tests and one for real stuff,
you can switch from one to the other at run time through that property,
that's for sure. I am not sure if this is applicable for your scenario.


Vanderghast, Access MVP
 
Back
Top