big database on sqlCE - it Takes a long time to open connection
-
hi i have database on sqlCE 75.6MB with 600,000 rows that has one table with 3 columns A - lenght 13 (text) B - lenght 20 (text) C - lenght 21 (text) i open the connection like this:
bool OpenConn()
{
try
{
Conn = new SqlCeConnection(String.Format(@"Data Source={0}\
{1}", PathI, "MyDB.SDF"));
Conn.Open();
return true;
}
catch (SqlCeException err)
{
MessageBox.Show(err.Message, "Connetion error");
return false;
}
}the problem that it take a long time to open connection. is there any other way for open and work with big database ? i work on sqlCE for Windows-CE or Windows-Mobile in C# thanks in advance
-
hi i have database on sqlCE 75.6MB with 600,000 rows that has one table with 3 columns A - lenght 13 (text) B - lenght 20 (text) C - lenght 21 (text) i open the connection like this:
bool OpenConn()
{
try
{
Conn = new SqlCeConnection(String.Format(@"Data Source={0}\
{1}", PathI, "MyDB.SDF"));
Conn.Open();
return true;
}
catch (SqlCeException err)
{
MessageBox.Show(err.Message, "Connetion error");
return false;
}
}the problem that it take a long time to open connection. is there any other way for open and work with big database ? i work on sqlCE for Windows-CE or Windows-Mobile in C# thanks in advance
We've had no problem with opening connections to databases up to 250mb on devices. Our connection string looks like..... "Data Source = \Storage Card\our_db.sdf;Max Database Size = 500;Max Buffer Size=4096;File Mode=Shared Read;Persist Security Info=False;" Opening the connection shouldn't be slow, I'm not sure what the default max size is but try specifying size, buffer and mode to see if it helps.