このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


一時期/支部 17. HyperSQL 経由で ODBC

一時期/支部 17. HyperSQL 経由で ODBC

How to 接近 a HyperSQL Server with ODBC

Blaine Simpson

The HSQL 開発 Group

$Revision: 5999 $

2024-10-25

(米)棚上げする/(英)提議する of Contents

Overview
Unix / Linux 取り付け・設備
Windows 取り付け・設備
Settings
見本s
(米)棚上げする/(英)提議する of Settings

Overview

Support for ODBC 接近 to HyperSQL servers was introduced in HSQLDB 見解/翻訳/版 2.0. 改良s were made to the server code for 見解/翻訳/版 2.5.1 to 許す an unmodified PostgreSQL ODBC driver (見解/翻訳/版 11) to be used. This 一時期/支部 has been adapted from the 初めの ODBC documentation and 追加するd to this Guide.

The 現在の 見解/翻訳/版 supports a large subset of ODBC calls. It supports all SQL 声明s, 含むing 用意が出来ている 声明s and result 始める,決める metadata, but it does not yet support database metadata, so some 使用/適用s may not work.

Unix / Linux 取り付け・設備

任命する/導入する unixODBC and PostgreSQL psqlodbc RPM or 一括. See https://help.interfaceware.com/v6/connect-to-postgresql-from-linux-or-mac-with-odbc

See the Settings section about individual driver runtime settings.

The unixODBC graphical program "ODBCConfig" just does not work for any driver I have ever tried to 追加する. If the same 適用するs to you, you will need to edit the とじ込み/提出するs

  • /etc/unixODBC/odbc.ini Driver 鮮明度/定義s
  • /etc/unixODBC/odbcinst.ini 全世界の DSN 鮮明度/定義s
  • $HOME/.odbc.ini Personal DSN 鮮明度/定義s

Depending on your UNIX or unixODBC 配当, your etc config とじ込み/提出するs may be 直接/まっすぐに in /etc/ instead of in the unixODBC subdirectory.

Windows 取り付け・設備

Download and 任命する/導入する PostgreSQL ODBC ソフトウェア. We 実験(する)d with 見解/翻訳/版 11 of this ソフトウェア in Unicode 方式, but other 見解/翻訳/版s may also work. In Windows, go to ODBC Data Source 行政官/管理者 (経由で 行政の 道具s, Data Source (ODBC) or ODBC DataSource in different 見解/翻訳/版s of Windows) and click on 追加する to 追加する a PostgreSQL data source. You can then configure the data source.

See the Settings section about individual driver runtime settings.

These DSN 鮮明度/定義 審査するs are not 同一の to what you see, but the individual settings are the same. The Data Source field is the 指名する of the ODBC data source. The database is the 指名する of the HyperSQL database on the server. In this example, the default server database 指名する is 示すd with a 削除する. Use localhost as the Server 指名する for the 地元の machine. The 使用者 指名する is a 使用者 指名する of the HyperSQL database, by default SA. You must 始める,決める a 非,不,無-empty password for the 使用者, さもなければ 関係 cannot be 設立するd.

The HyperSQL server must be started before 実験(する)ing the 関係.

Then 選択 審査する 1 of 2.

... and 2 of 2.

Settings

This section 適用するs to both UNIX and Windows. The setting 長,率いるing 含むs the descriptive 指名する as shown by the Windows ODBC DS 行政官/管理者, 同様に as the real keyword 指名するs that UNIX 使用者s will use.

The PostgreSQL ODBC Driver 製品 consists of two driver variants. You should try to use the Unicode variant first, since it supports the later and better ODBC 議定書. Use the ANSI variant if the Unicode variant won't work for your 使用/適用. The way you select the driver variant for a DSN is 壇・綱領・公約-明確な/細部. For UNIX, 始める,決める the DSN setting Driver to the 重要な as defined in the uniXODBC config とじ込み/提出する /etc/unixODBC/odbcinst.ini. For UNIX, select the driver after you click 追加する on the 使用者 DSN 審査する, or switch it afterwards with the DSN's Manage DSN button.

Driver settings can also be made at 関係 time by just appending keyword abbreviation/value assignment pairs to the ODBC 関係 string, delimiting each such pair with a semicolon. Base 関係 Strings are language-扶養家族, but you always append a String in this form

;A0=0;B9=1

See the (米)棚上げする/(英)提議する below for a concise 名簿(に載せる)/表(にあげる) of the abbreviations you may use. The 虫垂 also shows the default values for settings (this is really only necessary for UNIX 使用者s, since the Windows DSN 経営者/支配人 always shows the 現在の 効果的な value).

Runtime Driver Settings

Database

ODBC does not 許す an empty string for a DSN database 指名する. Therefore, you must 明示する DSN database 指名する of "/" (without the 引用するs) to 示す the default database

認める Unique 索引s

取り消す as FreeStmt

Find out what this 実験の feature is for.

MyLog

Enables 公正に/かなり verbose runtime logging to the 示すd とじ込み/提出する. With value 1 will 令状 coded mylog() messages to the MyLog とじ込み/提出する. With value 2 will 令状 both mylog() and inolog() messages to MyLog とじ込み/提出する.

CommLog

Enables runtime communiction logging to the 示すd とじ込み/提出する. With value 1, will 令状 coded qlog() messages to the CommLog.

Unknown Sizes

This 支配(する)/統制するs what SQLDescribeCol and SQLColAttributes will return as to precision for the variable data types when the precision (for example for a column) is 明示していない. For the recommended sql_enforce_strict_size 方式, this setting will have no 影響.

  • 最大限: Always return the 最大限 precision of the data type.
  • Dont Know: Return "Don't Know" value and let 使用/適用 decide.
  • Longest: Return the longest string length of the column of any 列/漕ぐ/騒動. Beware of this setting when using cursors because the (武器などの)隠匿場所 size may not be a good 代表 of the longest column in the (武器などの)隠匿場所.

MS 接近: Seems to 扱う 最大限 setting 承認する, as 井戸/弁護士席 as all the others. Borland: If sizes are large and lots of columns, Borland may 衝突,墜落 不正に (it doesn't seem to 扱う memory 配分 井戸/弁護士席) if using 最大限 size.

Max Varchar

Use this setting only as a work-around for (弁護士の)依頼人 app idiocy. 一般に, the database should 施行する your data 強制s.

The 最大限 precision of the VARCHAR and CHAR types (perhaps others). 始める,決める to 1 larger than the value you need, to 許す for null terminator characters. The default is 255 権利 now. 0 really means max of 0, and we need to change this ASAP so that 0 will mean 制限のない.

If you 始める,決める this value higher than 254, 接近 will not let you 索引 on varchar columns!

(武器などの)隠匿場所 Size

When using cursors, this is the 列/漕ぐ/騒動 size of the tuple (武器などの)隠匿場所. If not using cursors, this is how many tuples to 配分する memory for at any given time. The default is 100 列/漕ぐ/騒動s for either 事例/患者.

Max LongVarChar

The 最大限 precision of the LongVarChar type. The default is 4094 which 現実に means 4095 with the null terminator. You can even 明示する (-4) for this size, which is the odbc SQL_NO_TOTAL value.

ReadOnly

Whether the datasource will 許す updates.

Show System (米)棚上げする/(英)提議するs

The driver will 扱う/治療する system (米)棚上げする/(英)提議するs as 正規の/正選手 (米)棚上げする/(英)提議するs in SQLTables. This is good for 接近 so you can see system (米)棚上げする/(英)提議するs.

LF <-> CR/LF 転換

変える Unix style line endings to DOS style.

Updatable Cursors

Enable updateable cursor emulation in the driver. Fred will be 器具/実施するing real Updatable ResultSets.

列/漕ぐ/騒動 見解/翻訳/版ing

Will turn on MVCC 通貨 支配(する)/統制する 方式, once we 器具/実施する this.

True is -1

代表する TRUE as -1 for compatibility with some 使用/適用s.

Int8 As

Define what datatype to 報告(する)/憶測 int8 columns as.

Extra 選ぶs

Extra 選ぶs: combination of the に引き続いて bits.

  • 0x1: 軍隊 the 生産(高) of short-length formatted 関係 string. Check this bit when you use MFC CDatabase class.
  • 0x2: 偽の MS SQL Server so that MS 接近 認めるs PostgreSQL's serial type as AutoNumber type.
  • 0x4: Reply ANSI (not Unicode) char types for the 調査s from 使用/適用s. Try to check this bit when your 使用/適用s don't seem to be good at 扱うing Unicode data.

OID 選択s

  • Show Column: 含むs the OID in SQLColumns. This is good for using as a unique identifier to update 記録,記録的な/記録するs if no good 重要な 存在するs OR if the 重要な has many parts, which blows up the backend.
  • 偽の 索引: This 選択 偽のs a unique 索引 on OID. This is useful when there is not a real unique 索引 on OID and for apps which can't ask what the unique identifier should be (i.e, 接近 2.0).

OID 選択s

Level of rollback on errors: 明示するs what to rollback should an error occur.

  • Nop(0): Don't rollback anything and let the 使用/適用 扱う the error.
  • 処理/取引(1): Rollback the entire 処理/取引.
  • 声明(2): Rollback the 声明.

default value is a 宣告,判決 部隊 (it is a 処理/取引 部隊 before 8.0).

関係 Settings

The driver sends these 命令(する)s to the backend upon a successful 関係. It sends these settings AFTER it sends the driver "Connect Settings". Use a 半分-結腸 (;) to separate 命令(する)s. This can now 扱う any query, even if it returns results. The results will be thrown away however!

見本s

The HyperSQL Engine 配当 含む/封じ込めるs these same ODBC (弁護士の)依頼人 code examples in the 見本 subdirectory.

(米)棚上げする/(英)提議する of Settings

See the above section for descriptions and usage 詳細(に述べる)s. This section just 含む/封じ込めるs a 名簿(に載せる)/表(にあげる) of the 利用できる settings.

(米)棚上げする/(英)提議する 17.1. Settings 名簿(に載せる)/表(にあげる)

KeywordAbbrev.Default Val.目的
DescriptionN/A Data source description
ServernameN/A[要求するd]指名する of Server
PortN/A9001HyperSQL Server Listen Port
UsernameN/A[要求するd]使用者 指名する
PasswordN/A[要求するd]Password
DebugB20MyLog logging level
FetchA7100Fetch Max Count 実験(する) to see if this 適用するs to EXECDIRECT and/or 用意が出来ている queries
SocketA84096Socket 衝撃を和らげるもの size
ReadOnlyA0No/0Read Only
CommLogB30スピードを出す/記録につける communications to スピードを出す/記録につける とじ込み/提出する
UniqueIndexN/A1認める unique 索引s
UnknownSizesA90 [= max prec. for type]Unknown result 始める,決める sizes
CancelAsFreeStmtC10取り消す as FreeStmt
UnknownsAsLongVarcharB80Unknowns as LongVarchar
BoolsAsCharB90Bools as Char
MaxVarcharSizeB0255Max Varchar size. Value of 0 will break everything. We will be changing 0 to mean 制限のない and will then change the default to 0.
MaxLongVarcharSizeB18190Max LongVarchar size
RowVersioningA40列/漕ぐ/騒動 見解/翻訳/版ing
ShowSystemTablesA50Show System (米)棚上げする/(英)提議するs
DisallowPrematureC30Disallow Premature
UpdatableCursorsC40Updatable Cursors
LFConversionC51 Windows, 0 UNIXLF <-> CR/LF 転換
TrueIsMinus1C60True is -1
BIN/A0Datatype to 報告(する)/憶測 BIGINT columns as
LowerCaseIdentifierC90Lower 事例/患者 identifier
SSLmodeCA無能にするSSL 方式
ABN/A 関係 string suffix 選択s

Abbreviations are for use in 関係 strings.


$Revision: 6787 $