【问题标题】:Selected collating sequence not supported by the operating system. WinXP操作系统不支持选定的整理顺序。操作系统
【发布时间】:2017-10-25 05:05:39
【问题描述】:

我想从 .mdb 获取一些数据,但在 WinXP 机器上出现异常。已经安装了 MDAC 2.8。有没有办法在不改变数据库类型的情况下解决我的问题?获取数据的方法:

private void GetDatafromDB(){
        int counter = 0;
        string _sql = "select * from template where 1=1";
        OleDbDataReader reader = ldb.ReadList(_sql);
                while (reader.Read())
                {

                    if (reader[1] is DBNull)
                        continue;
                     this.t0 = reader[0].ToString();//autoid
                     this.t1 = reader[1].ToString();//real name
                     this.t2 = reader[2].ToString();//userid
                     this.t3 = reader[3].ToString();//fingerindex
                     this.t4 = reader[4].ToString();//rights
                     this.t5 = reader[5].ToString();//base64  template_9


                    //int autoid = (int)reader[0];
                    byte[] tmp = Convert.FromBase64String(this.t5);
                    zkfp2.DBAdd(mDBHandle, Int32.Parse(t3), tmp);
                    counter++;
          }
          textTips.AppendText("Loaded "+ counter +" fingerprints \r\n");
    }

例外:

**************异常文本**************

System.Data.OleDb.OleDbException:选择的整理顺序不是 操作系统支持。在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult 小时)在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams,对象和执行结果)在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(对象& 执行结果)在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior 行为,对象和执行结果)在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior 行为,字符串方法)在 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior 行为) 在 System.Data.OleDb.OleDbCommand.ExecuteReader() 在 WindowsFormsApp1.LocalDb.ReadList(String SQL) 在 c:\用户\用户\桌面\指纹 WINxp\WindowsFormsApp1\LocalDb.cs:第 132 行 WindowsFormsApp1.Form1.GetDatafromDB() 在 c:\用户\用户\桌面\指纹 WINxp\WindowsFormsApp1\Form1.cs:第 362 行 WindowsFormsApp1.Form1.connDevice_Click(Object sender, EventArgs e) in c:\用户\用户\桌面\指纹 WINxp\WindowsFormsApp1\Form1.cs:第 354 行 System.Windows.Forms.Control.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs 事件) 在 System.Windows.Forms.Control.WmMouseUp(消息和 m,鼠标按钮 按钮,Int32 点击)在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ButtonBase.WndProc(Message& m) 在 System.Windows.Forms.Button.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(消息& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息& m) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

【问题讨论】:

标签: c# .net ms-access windows-xp


【解决方案1】:

问题是目标机器有另一种系统语言,而 .mdb 文件已在另一种系统语言上创建。在目标机器上创建新数据库 - 解决了我的问题。

来源 - http://www.cnblogs.com/zoupeiyang/archive/2009/03/11/1408741.html

【讨论】:

    猜你喜欢
    • 2018-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-25
    • 1970-01-01
    • 2011-02-21
    • 1970-01-01
    • 2021-07-27
    相关资源
    最近更新 更多