SQLCE无效算法指定错误

时间:2013-04-26 17:07:32

标签: sql-server-ce

下面的代码抛出'无效算法指定错误'

代码:

DataTable dataTable = new DataTable();
        SqlCeConnection conn = DataHelper.GetConnection();
        {
            using (SqlCeCommand cmd = conn.CreateCommand())
            {
                cmd.CommandText = "SELECT * FROM <table>";
                SqlCeDataAdapter dataAdapter = new SqlCeDataAdapter(cmd);
                dataTable.Locale = System.Globalization.CultureInfo.InvariantCulture;
                dataAdapter.Fill(dataTable);
            }
        }
        return dataTable;

错误消息 指定的算法无效。 - 在System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)

堆栈跟踪     在System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()     在System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior,String method,ResultSetOptions options)     在System.Data.SqlServerCe.SqlCeCommand.ExecuteReader(CommandBehavior行为)     在System.Data.SqlServerCe.SqlCeCommand.ExecuteDbDataReader(CommandBehavior行为)     在System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior行为)     在System.Data.Common.DbDataAdapter.FillInternal(DataSet数据集,DataTable [] datatables,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand命令,CommandBehavior行为)     在System.Data.Common.DbDataAdapter.Fill(DataTable [] dataTables,Int32 startRecord,Int32 maxRecords,IDbCommand命令,CommandBehavior行为)     在System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)

0 个答案:

没有答案