简体   繁体   English

操作系统不支持的选定整理顺序。 WinXP的

[英]Selected collating sequence not supported by the operating system. WinXP

I want to get some data from .mdb but I get an exception on WinXP machine. 我想从.mdb中获取一些数据,但在WinXP计算机上却出现异常。 There is MDAC 2.8 alrdy installed. 安装了MDAC 2.8 alrdy。 Is there way to solve my problem without changing DB type? 有没有办法解决我的问题而无需更改数据库类型? Method to get data.: 获取数据的方法:

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");
    }

Exception: 例外:

************** Exception Text ************** **************例外文字**************

System.Data.OleDb.OleDbException: Selected collating sequence not supported by the operating system. System.Data.OleDb.OleDbException:操作系统不支持的选定整理顺序。 at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteReader() at WindowsFormsApp1.LocalDb.ReadList(String SQL) in c:\\Users\\user\\Desktop\\fingerprint WINxp\\WindowsFormsApp1\\LocalDb.cs:line 132 at WindowsFormsApp1.Form1.GetDatafromDB() in c:\\Users\\user\\Desktop\\fingerprint WINxp\\WindowsFormsApp1\\Form1.cs:line 362 at WindowsFormsApp1.Form1.connDevice_Click(Object sender, EventArgs e) in c:\\Users\\user\\Desktop\\fingerprint WINxp\\WindowsFormsApp1\\Form1.cs:line 354 at System.W 在System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams,Object&executeResult)在System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(System.Data.OleDb.OleDbCommand.ExecuteCommandText(Data&Execute。) System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior行为,String方法)位于System.Data.OleDb的OleDb.OleDbCommand.ExecuteCommand(CommandBehavior行为,String方法)System.Data.OleDb处的OleDbCommand.ExecuteReader(CommandBehavior行为) c:\\ Users \\ user \\ Desktop \\ fingerprint中的WindowsFormsApp1.LocalDb.ReadList(String SQL)的OleDbCommand.ExecuteReader()在c:\\ Users \\中的WindowsFormsApp1.Form1.GetDatafromDB()处的WINxp \\ WindowsFormsApp1 \\ LocalDb.cs:132行user \\ Desktop \\ Fingerprint WINxp \\ WindowsFormsApp1 \\ Form1.cs:Windows FormsApp1.Form1.connDevice_Click(Object sender,EventArgs e)中的362行位于c:\\ Users \\ user \\ Desktop \\ fingerprint WINxp \\ WindowsFormsApp1 \\ Form1.cs:第354行系统 indows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) System.Windows.Forms.Button.OnClick(EventArgs e)(位于System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent),位于System.Windows.Forms.Control.WmMouseUp()中的indows.Forms.Control.OnClick(EventArgs e) Message&m,MouseButtons按钮,Int32 clicks)位于System.Windows.Forms.Button.WndProc(Message&m)位于System.Windows.Forms.Button.WndProc(Message&m) )的System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)的System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&m)的System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg, IntPtr wparam,IntPtr lparam)

The problem was that target machine has another system language and .mdb file has been created on another one. 问题在于目标计算机使用另一种系统语言,并且在另一计算机上创建了.mdb文件。 Creating new database on target machine - solved my question. 在目标计算机上创建新数据库-解决了我的问题。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误消息'此操作系统不支持指定的区域设置。 - Error message 'The specified locale is not supported on this operating system.' 此操作系统不支持区域设置 ID。 LCID=8192 - Locale id is not supported on this operating system. LCID=8192 如何从Windows操作系统获取当前用户名和密码。 - How get Current Username and password from windows operating System. 类型'System.String'不支持序列运算符。 - Sequence operators not supported for type 'System.String'. 导致此错误的原因:类型'System.String'不支持序列运算符 - what causes this error: Sequence operators not supported for type 'System.String' Linq-to-Sql - 类型'System.String'不支持的序列运算符 - Linq-to-Sql - Sequence operators not supported for type 'System.String' .NET FRAMEWORK 4.6.1在此操作系统上不受支持-通过Visual Studio Community 2017供软件开发人员使用 - .NET FRAMEWORK 4.6.1 is not supported on this operating system - for Software Developer through Visual Studio Community 2017 在WinXP上使用.NET进行文件系统事务 - File System Transactions using .NET on WinXP System。*名称空间与自定义名称空间冲突 - System.* namespace collide with custom namespace 登录系统。 StreamReader转换为字符串 - Login System. StreamReader convertion to string
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM