我收到错误:没有足够的存储空间来完成此操作

时间:2013-09-19 12:25:15

标签: c# sql-server-ce

我收到错误

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;

0 个答案:

没有答案