views:

145

answers:

1

Is it posible to open more than 2 databases in WinCE ?

I work with Sql CE 3.5. Can I get example for open 2 connections?

+1  A: 

You're going to have to give us a bit more to go on than that. What kind of database? SQLCE? MySQL? SQL Server via a SqlClient? EDB? db4o? Something else?

In general, there is no issue with opening multiple databases from a single app simultaneously- you just have to have a separate connection object for each. You can also have multiple connections to the same database, provided the data engine you're using supports it (SQL CE 3.5 does, earlier doesn't, SQL Server does, not idea if MySQL does).

Edit: For example, to make 2 separate connections to a SQL CE database, just create two distinct SqlCeConnection objects using the same connection string.

ctacke
minor note - in SqlServerCE those multiple connections must come from the same machine (up to limit of 256)
ShuggyCoUk
YEs, for the desktop that is true. For Windows CE, there's no way to make a connection that isn't local, so the rule doesn't apply.
ctacke