Multiple providers with typed tableadapter

  • Thread starter Thread starter Polaris431
  • Start date Start date
P

Polaris431

I am using VS 2005 and created a dataset using the designer. I have
two different data sources although both have the same schema. One is
a SQL Server 2005 database while the other is a SQL Server 2005
Mobile. In the designer a connection is automatically setup when I
drag a table to the designer. Initially it is set to use the SQL
Server 2005 database. At runtime however, I want to optionally switch
to using the SQL Server 2005 Mobile database. The problem is, is that
the tableadapter is strongly typed to a SQL Server 2005 Connection and
not a Mobile Connection. I simply cannot create a connection object
from SQL Server 2005 Mobile and attach it to the tableadapter
connection object.

So how do I switch to a different provider when using typed
tableadapters?

Thanks
Polaris
 
Hi there,

See my reply in "How to refresh a typed dataset in Visual Studio 2005" few
threads below.
In your case (dealing with different databases) an ORM solution would really
fit well.
 
But I don't want to refresh in VS. I want to change to a different
provider during run-time.
 
The story is the same...vs designer isn't meant to do things like that thus
a wise move is to search for an alternative or start coding every adapter.
 
Back
Top