本文介绍了优势ADT文件的连接中的排序规则错误5175的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在VB.NET中开发一个必须连接到表Advantage(ADT)的应用程序

I am developing an application in VB.NET which must be connected to a table Advantage (ADT)

我使用以下连接字符串:

I use the following connection string:

DSN=kantechX;DataDirectory=C:\DB\Data;SERVER=NotTheServer;
Compression=Never;DefaultType=Advantage;Rows=False;
collation=SPANISH_VFP_CI_AS_1252;AdvantageLocking=ON;Locking=Record;
MemoBlockSize=64;MaxTableCloseCache=5;ServerTypes=1;
TrimTrailingSpaces=False;EncryptionType=RC4;FIPS=False

生成以下错误:

我们还尝试使用Advantage Data Architect 1110进行连接,并且在打开表时显示此错误:

We also tried the connection using the Advantage Data Architect 1110 and when the table is opened it shows this error:

Architect要求重新索引表以及何时重新索引我们这样做,它不会显示警报2,但是当我们尝试从vb.net与ODBC连接时,异常会保留第一条错误消息。

Architect asks for the re-indexing of the table and when we do it, it does not show the alert 2, but when we tried to connect with ODBC from vb.net the exception maintains the first error message.

我已经检查了adslocal.cfg文件,但没有找到有用的东西

I have checked the adslocal.cfg file and I have not found anything useful

如何解决此问题?

推荐答案

多亏了Jens链接和我在Google上找到的其他信息,我终于可以解决问题了。

I could finally solve the problem, thanks to Jens link and other information I found on google.

步骤如下:


  1. 备份文件(以防万一)

  1. Make a backup of the files (just in case)

在要连接ADT表的计算机上安装Advantage Architect。

Install Advantage Architect in the machine where they are the ADT tables to be connected.

下载并安装.NET Data Provider(保留语言的默认设置) [当前的Languaje]和[编码] [美国]),我们可以找到.NET的解决方案

Download and install .NET Data Provider (leave the default settings for language [Current Languaje] and coding [USA]) where we have the solution for .NET

在我们有.NET解决方案的计算机上下载并安装Advantage ODBC驱动程序(保留语言[Current Languaje]和编码[USA]的默认设置)。

4.1尝试安装32位版本或64位,尽管我的系统是64位,但我必须安装32位才能使其正常工作

Download and install Advantage ODBC Driver (leave the default settings for language [Current Languaje] and coding [USA]) on the machine where we have the solution for .NET.     

4.1 try to install the 32-bit version or 64-bit, although my system is 64-bit I had to install the 32-bit to make it work

打开Architect并创建到现有表的新连接(ADT文件)

Open Architect and create a new connection to existing tables (ADT file)

在Architect中打开表双击

6.1会显示一条警报,指示该表使用不同的语言编码,并且如果要更改连接参数(永久性,仅此一次或忽略),我们说我们要永久更改(如果未永久选择,则无法执行以下步骤)

6.2此处发生以下两种情况之一:

-它显示警告,指示表的索引为在另一个排序规则和建议的重新索引中(这正是需要完成的操作)

-它表示该表正在使用中且无法打开,在这种情况下,您必须分开复制文件并重复步骤5和6,然后覆盖

In Architect Open the table by double clicking     

6.1 appears an alert indicating that the table is encoded in a different language and if you want to change the connection parameters (permanently, only this time or ignore), to which we say we want to permanently change (if not permanently selected, we can not perform the following steps)     

6.2 Here one of two things happens:     

       -It displays an alert indicating that the index of the table is in another collation and recommended reindex (this is precisely what needs to be done)     

       -It indicates that the table is in use and can not be opened, in this case you must copy the file apart and repeat steps 5 and 6 for it and then overwrite the blocked one.

仅出于安全考虑,我们将执行允许多个排序规则索引的命令EXECUTE PROCEDURE sp_AllowMultipleCollat​​ions(``,true),第一个参数为空,表示不适用于所有编码,尤其是 Spanish_vfp_ci_as_1252,第二个参数true表示自由限制。

要运行此命令的

7.1,请在Architect的菜单中寻找使用SQL运行或创建手动查询的选项

only for safety we will execute a command that allows multiple collations index EXECUTE PROCEDURE sp_AllowMultipleCollations ( '', true), the first parameter empty, '', indicates that apply to all encodings not one in particular as' Spanish_vfp_ci_as_1252 ', the second parameter, true, indicates that free restrictions.      

7.1 to run this command look for the option to run or create manual queries with SQL in the menu of the Architect

DSN = [在Windows中创建的ODBC]; DataDirectory = [ADT文件的路径];服务器= NotTheServer;压缩=;
DefaultType =优势;行=假;语言= SPANISH_VFP_CI_AS_1252;
AdvantageLocking =开;锁定=记录; MemoBlockSize = 64; MaxTableCloseCache = 5; ServerTypes = 1;
TrimTrailingSpaces = False; EncryptionType = RC4; DDPassword = kantech;
FIPS = False; TLSCiphers = AES128-SHA:AES256-SHA:RC4-MD5

DSN = [ODBC created in Windows]; DataDirectory = [Path to the ADT file]; SERVER = NotTheServer; Compression =;DefaultType = Advantage; Rows = False; Language = SPANISH_VFP_CI_AS_1252;AdvantageLocking = ON; Locking = Record; MemoBlockSize = 64; MaxTableCloseCache = 5; ServerTypes = 1;TrimTrailingSpaces = False; EncryptionType = RC4; DDPassword = kantech;FIPS = False; TLSCiphers = AES128-SHA: AES256-SHA: RC4-MD5

  9.1 if when You run the application doesnt allow use odbc for any reason maybe you you must add the advantage DLL in the solution references (Right click in the solution folder > add references > search in the COM for Advantage) .

这篇关于优势ADT文件的连接中的排序规则错误5175的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 04:13