Ещё раз и снова... Кодировка Paradox и параметры для IN

_MaxLife_
Дата: 01.06.2004 10:21:53
Добрый день!

Ещё раз о кодировках внешних файлов.

Paradox. Если указана досовская кодовая страница, всё прекрасно - данные приходят как надо. Но если указана "ascii ansi" - русские символы - мусор.

Для загрузки используется запрос вида:

 insert into AccesTable (a_field_name) 
 select p_field_name 
 FROM ParadoxTable IN 'paradox_path' [Paradox 4.x;HDR=NO;IMEX=2]

Соответственно, вопросы:

1. Никто не знает, как бороться с кодовой таблицей "ascii ansi" - единственный известный мне работающий способ - открыть таблицу из Borland Database Desktop и сменить таблице языковой драйвер?

2. Где-нибудь можно найти спецификацию приведённых в примере параметров?
Shuhard
Дата: 01.06.2004 13:12:29
When you install the Paradox database driver, the Setup program writes a set of default values to the Windows Registry in the Engines and ISAM Formats subkeys. You should not modify these settings directly (unless necessary); use the setup program for your application to add, remove, or change these settings. The following sections describe initialization and ISAM Format settings for the Paradox database driver.

Paradox Initialization Settings

The Jet\3.5\Engines\Paradox folder includes initialization settings for the Mspdox35.dll driver, used for access to external Paradox data. Typical settings for the entries in this folder are shown in the following example.

win32=<pathname>\MSPDOX35.dll
PageTimeout=600
CollatingSequence=ASCII
DataCodePage=OEM
ParadoxUserName=Kimberly
ParadoxNetPath=P:\PDOXDB
ParadoxNetStyle=4.X

The Microsoft Jet database engine uses the Paradox folder entries as follows.

Entry	Description
win32	The location of Mspdox35.dll. The full pathname is determined at the time of installation. Values are of type String for Windows 95 and Windows NT 4.0, and of type REG_SZ for Windows NT 3.51.
PageTimeout	The length of time between when data is placed in an internal cache and when it is invalidated. The value is specified in 100 millisecond units. The default is 600 units or 60 seconds. Values are of type DWORD for Windows 95 and Windows NT 4.0, and of type REG_DWORD for Windows NT 3.51.
CollatingSequence	The collating sequence for all Paradox tables created or opened using Microsoft Jet. Possible values are ASCII, International, Norwegian-Danish, and Swedish-Finnish. The CollatingSequence entry must match the collating sequence used when the Paradox table was built. The default is ASCII. Values are of type String for Windows 95 and Windows NT 4.0, and of type REG_SZ for Windows NT 3.51.
DataCodePage	An indicator of how text pages are stored. Possible settings are:•	OEM
OemToAnsi and AnsiToOem conversions done.•	ANSI
OemToAnsi and AnsiToOem conversions not done.The default is OEM. Values are of type String for Windows 95 and Windows NT 4.0, and of type REG_SZ for Windows NT 3.51.
ParadoxUserName	The name to be displayed by Paradox if a table is locked by the Paradox ISAM and an interactive user accessing the data from Paradox (rather than the ISAM) attempts to place an incompatible lock. This entry isn’t added if the computer isn't on a network. Values are of type String for Windows 95 and Windows NT 4.0, and of type REG_SZ for Windows NT 3.51.Note: If you indicate a ParadoxUserName, you must also specify a ParadoxNetPath and a ParadoxNetStyle or you’ll receive an error when trying to access external Paradox data. Also, if you’re accessing a Paradox database in multi-user mode over the network, you’ll have to add or modify this registry entry manually.
ParadoxNetPath	The full path to the directory containing the PARADOX.NET file (for Paradox 3.x) or the PDOXUSRS.NET file (for Paradox 4.x). This entry isn’t added if the computer isn’t on a network. Usually, you need to change the initial setting (added by the Setup program), which is a best guess at where the file might be. The full ParadoxNetPath (including the drive letter) must be consistent for all users sharing a particular database (directory). Values are of type String for Windows 95 and Windows NT 4.0, and of type REG_SZ for Windows NT 3.51.Note: If you indicate a ParadoxNetPath, you must also specify a ParadoxUserName and a ParadoxNetStyle or you’ll receive an error when trying to access external Paradox data. Also, if you’re accessing a Paradox database in multi-user mode over the network, you’ll have to add or modify this registry entry manually.
ParadoxNetStyle	The network access style to use when accessing Paradox data. Possible values are:•	3.x
•	4.x(Note that Paradox 3.x users can’t set this to 4.x or the driver will use the wrong locking method. Paradox 5.0 users must use the 4.x ParadoxNetStyle setting to ensure proper locking behavior.)This entry isn’t added if the computer isn’t on a network. This entry should correspond to whatever version of Paradox the users in the group are using. It must be consistent for all users sharing a particular database (directory). The default is 4.x. Values are of type String for Windows 95 and Windows NT 4.0, and of type REG_SZ for Windows NT 3.51.Note: If you indicate a ParadoxNetStyle, you must also specify a ParadoxUserName and a ParadoxNetPath or you’ll receive an error when trying to access external Paradox data.
Paradox ISAM Formats

The Jet\3.5\ISAM Formats\Paradox 3.x folder contains the following entries.

Entry name	Windows NT 3.51 Type	Windows 95 and Windows NT 4.0 Type	Value
Engine	REG_SZ	String	Paradox
ExportFilter	REG_SZ	String	Paradox 3 (*.db)
ImportFilter	REG_SZ	String	Paradox (*.db)
CanLink	REG_BINARY	Binary	01
OneTablePerFile	REG_BINARY	Binary	01
IsamType	REG_DWORD	DWORD	0
IndexDialog	REG_BINARY	Binary	00
CreateDBOnExport	REG_BINARY	Binary	00
ResultTextImport	REG_SZ	String	Import data from the external file into the current database. Changing data in the current database will not change data in the external file.
ResultTextLink	REG_SZ	String	Create a table in the current database that is linked to the external file. Changing data in the current database will change data in the external file.
ResultTextExport	REG_SZ	String	Export data from the current database into a Paradox 3 file. This process will overwrite the data if exported to an existing file.
The Jet\3.5\ISAM Formats\Paradox 4.x folder contains the following entries.

Entry name	Windows NT 3.51 Type	Windows 95 and Windows NT 4.0 Type	Value
Engine	REG_SZ	String	Paradox
ExportFilter	REG_SZ	String	Paradox 4 (*.db)
CanLink	REG_BINARY	Binary	01
OneTablePerFile	REG_BINARY	Binary	01
IsamType	REG_DWORD	DWORD	0
IndexDialog	REG_BINARY	Binary	00
CreateDBOnExport	REG_BINARY	Binary	00
ResultTextExport	REG_SZ	String	Export data from the current database into a Paradox 4 file. This process will overwrite the data if exported to an existing file.
The Jet\3.5\ISAM Formats\Paradox 5.x folder contains the following entries.

Entry name	Windows NT 3.51 Type	Windows 95 and Windows NT 4.0 Type	Value
Engine	REG_SZ	String	Paradox
ExportFilter	REG_SZ	String	Paradox 5 (*.db)
CanLink	REG_BINARY	Binary	01
OneTablePerFile	REG_BINARY	Binary	01
IsamType	REG_DWORD	DWORD	0
IndexDialog	REG_BINARY	Binary	00
CreateDBOnExport	REG_BINARY	Binary	00
ResultTextExport	REG_SZ	String	Export data from the current database into a Paradox 5 file. This process will overwrite the data if exported to an existing file.
Note   When you change Windows Registry settings, you must exit and then restart the database engine for the new settings to take effect.

Shuhard
Дата: 01.06.2004 13:14:20
he following table shows how you can use the IN clause to retrieve data from an external database. In each example, assume the hypothetical Customers table is stored in an external database.

External database	
SQL statement
Microsoft Jet database	SELECT CustomerID
FROM Customers
IN OtherDB.mdb 
WHERE CustomerID Like "A*";
dBASE III or IV.
To retrieve data from a dBASE III table, substitute "dBASE III;" for "dBASE IV;".	SELECT CustomerID
FROM Customer
IN "C:\DBASE\DATA\SALES" "dBASE IV;"
WHERE CustomerID Like "A*";
dBASE III or IV using Database syntax.	SELECT CustomerID
FROM Customer
IN "" [dBASE IV; Database=C:\DBASE\DATA\SALES;] 
WHERE CustomerID Like "A*";
Paradox 3.x or 4.x.
To retrieve data from a Paradox version 3.x table, substitute "Paradox 3.x;" for "Paradox 4.x;".	SELECT CustomerID
FROM Customer
IN "C:\PARADOX\DATA\SALES" "Paradox 4.x;"
WHERE CustomerID Like "A*";
Paradox 3.x or 4.x using Database syntax.	SELECT CustomerID
FROM Customer
IN "" [Paradox 4.x;Database=C:\PARADOX\DATA\SALES;] 
WHERE CustomerID Like "A*";
A Microsoft Excel worksheet	SELECT CustomerID, CompanyName
FROM [Customers$] 
IN "c:\documents\xldata.xls" "EXCEL 5.0;"
WHERE CustomerID Like "A*"
ORDER BY CustomerID;
A named range in a worksheet	SELECT CustomerID, CompanyName
FROM CustomersRange
IN "c:\documents\xldata.xls" "EXCEL 5.0;"
WHERE CustomerID Like "A*"
ORDER BY CustomerID;
_MaxLife_
Дата: 02.06.2004 08:23:43
Ничего не хочу сказать по поводу сего документа, но смена ключа в реестре делает немного меньше, чем ничего. Причём, что интересно, досовская кодировка читается без проблем и так.

Впрочем, спасибо. Проблему я обошёл с другой стороны. Нашёл функцию для принудительной смены кодировки в самих таблицах.
e_basil_x
Дата: 02.06.2004 09:53:05
2 MaxLife_

автор
Проблему я обошёл с другой стороны. Нашёл функцию для принудительной смены кодировки в самих таблицах.
Очень интересует эта тема
Не поделитесь опытом?
_MaxLife_
Дата: 02.06.2004 14:40:33
Здесь

http://www.delphisyte.ru/Articles/base/change_langdriver.html

Я устанавливал 'Paradox Cyrr 866' или 'Paradox ANSI Cyrillic'.
mallory
Дата: 03.01.2007 22:03:32
Я создал таблицу в Database Desktop (v.7.0). Тип таблицы - Paradox 7. Table properties -> Table language ->Pdox ANSI Cyrillic. Но вводя данные в столбец русскими буквами - отображаются при этом латинские буквы с диакретическими(кажется, так называются) значками. Как быть?