Multiple providers with typed tableadapter

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
 
M

Miha Markic [MVP C#]

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.
 
P

Polaris431

But I don't want to refresh in VS. I want to change to a different
provider during run-time.
 
M

Miha Markic [MVP C#]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top