我收到错误
System.Data.SqlServerCe.SqlCeException:
Not enough storage is available to complete this operation.
at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at System.Data.SqlServerCe.SqlCeConnection.Open()
1.db3
是该数据库,其大小约为3.8 GB。
db的大小是否会导致此类错误?请解释此类错误的可能原因。
private void TestConnection()
{
if (_connection != null && _connection.State != ConnectionState.Closed)
{
_connection.Close();
_connection.Dispose();
}
_connection = new SqlCeConnection(_connectionString);
_connection.Open();
}
private string _connectionString = "C:\1.db3;password='apple';mode=Read Write;max database size=4091;temp file max size=4091";
private SqlCeConnection _connection;