Here's some sample code that is how I connect / connect / work with my database
string connection = @ "data source = 'c: \ test.sdf'; maximum database size = 4000;" + "Max buffer size = 4096;"; ;: File.Delete ("\ test.sdf c" @) (Var engine = using new SqlCeEngine (connection)) {engine.CreateDatabase (); Engine.Compact ("Data Source =; Case Sensitive = True; Maximum Database Size = 4000;"); } (Using Var dbConn = new SqlCeConnection) {// Create tables, indexes, etc. And add load of data here // I get // to load data somewhere "the database file is big ..." Exception} This is my question. The size of the database file at the time of exception is just 368 MB (386,879,488 bytes to be accurate according to the file properties). Do I need to add a maximum database size string to a compact statement?
Any other ideas may be wrong.
The default value for the Max database size is 256 MB, so yes, you have to add it to the connection string , If the size of the file grows on it
Comments
Post a Comment