Difference between revisions of "Lazarus DB Faq/ja"

From Free Pascal wiki
Jump to navigationJump to search
m
 
m
Line 18: Line 18:
 
[[Install Packages|ここ]]にパッケージインストールのヘルプがあります。
 
[[Install Packages|ここ]]にパッケージインストールのヘルプがあります。
  
=== Are there other components? ===
+
=== 上記のほかのコンポーネントはありますか? ===
  
Yes. The [http://zeoslib.sourceforge.net/index.php ZEOS components] have been ported to Lazarus as well.
+
はい。[http://zeoslib.sourceforge.net/index.php ZEOS components]が、すでにLazarusへポーティングされています。
<br>You have to download ZEOSDBO_Rework from [http://sourceforge.net/cvs/?group_id=35994 ZEOS cvs].
+
<br>ZEOSDBO_Rework を、 [http://sourceforge.net/cvs/?group_id=35994 ZEOS cvs]から、ダウンロードする必要があります。
<br>See also this tutorial for [[Zeos_tutorial|Zeos]].
+
<br>このチュートリアルは、[[Zeos_tutorial|Zeos]]を見てください。
<br>[https://trac.synsport.com:8000/index.php/pdo/wiki Pascal Data Objects] works equally with Delphi and FPC 2.0
+
<br>[https://trac.synsport.com:8000/index.php/pdo/wiki Pascal Data Objects]も、同様にDelphiとFPC2.0で動作します。
 +
== IB / FB (Interbase,Firebirdについて)==
  
== IB / FB ==
+
=== Linuxから、Windowsへのサーバーへはどうやって接続するのでしょうか。 ===
 +
LinuxクライアントからWindowsサーバーのデータベースへの正しいパスをきちんと書く方法は、あまり一般的ではありません。
  
=== How do I connect from Linux to a Windows server ===
+
あなたがFirebirdをF:\Program Files\firebird\にインストールしたとします。
Entering the correct path to a database on a Windows server from a Linux client is not very clear.  
+
この場合、サンプルのデータベースであるemployee.fdbが、F:\Program Files\firebird\examples\ にインストールされています。また、サーバーのIPアドレスが 192.168.2.100であったと仮定しましょう。
  
Say you have installed firebird in F:\Program Files\firebird\. The employee.fdb example database will then be installed in the directory F:\Program Files\firebird\examples\ . The IP-adress of your computer is 192.168.2.100.
+
そうすると、IBConnectionでは、次のようにデータベース名を記述すると、きちんと接続するでしょう。
 
 
Then entering the following databasename 
 
 
  192.168.2.100:F:\Program Files\firebird\examples\employee.fdb
 
  192.168.2.100:F:\Program Files\firebird\examples\employee.fdb
in your IBConnection will connect to the required database.
 
  
Note that you don't have to enter a value for the hostname property!
+
注意:hostnameプロパティには、値を設定する必要はありません。
  
 
== MySQL ==
 
== MySQL ==
  
=== Which version of mySQL is supported? ===
+
=== mySQLのどのバージョンがサポートされていますか? ===
  
 
Currently MySQL 4.0, MySQL 4.1 and MySQL 5.0 are supported by de SQLdb components. Make sure you are using the correct connection component for your client library version. So if you have the client libraries installed for MySQL 4.1 then you have to use TMySQL41Connection component, even if the server is running version 4.0 or 5.0.
 
Currently MySQL 4.0, MySQL 4.1 and MySQL 5.0 are supported by de SQLdb components. Make sure you are using the correct connection component for your client library version. So if you have the client libraries installed for MySQL 4.1 then you have to use TMySQL41Connection component, even if the server is running version 4.0 or 5.0.

Revision as of 10:25, 5 August 2006

Deutsch (de) English (en) español (es) français (fr) italiano (it) 日本語 (ja) português (pt) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN)

日本語版メニュー
メインページ - Lazarus Documentation日本語版 - 翻訳ノート - 日本語障害情報

General

このFAQはLazarusでのデータベースプログラミングに関するものです。

どうしたら、もっと他のFAQを見つけられますか?

オフィシャルWebサイトwww.lazarus.freepascal.org.を見てください。(こちら

どうしたら、データベースコンポーネントを見つけられますか?

現在、SQLdbコンポーネントはLazarusのパッケージになっていますので、インストールさえすればよいです。 [$LazarusDir]/componentsフォルダをみると、SQLdbのサブディレクトリがあるでしょう。sqldblaz.lpkをインストールすると、MySQL,Interbase/Firebird, PostgresのDBサーバへ接続することができます。

ここにパッケージインストールのヘルプがあります。

上記のほかのコンポーネントはありますか?

はい。ZEOS componentsが、すでにLazarusへポーティングされています。
ZEOSDBO_Rework を、 ZEOS cvsから、ダウンロードする必要があります。
このチュートリアルは、Zeosを見てください。
Pascal Data Objectsも、同様にDelphiとFPC2.0で動作します。

IB / FB (Interbase,Firebirdについて)

Linuxから、Windowsへのサーバーへはどうやって接続するのでしょうか。

LinuxクライアントからWindowsサーバーのデータベースへの正しいパスをきちんと書く方法は、あまり一般的ではありません。

あなたがFirebirdをF:\Program Files\firebird\にインストールしたとします。 この場合、サンプルのデータベースであるemployee.fdbが、F:\Program Files\firebird\examples\ にインストールされています。また、サーバーのIPアドレスが 192.168.2.100であったと仮定しましょう。

そうすると、IBConnectionでは、次のようにデータベース名を記述すると、きちんと接続するでしょう。

192.168.2.100:F:\Program Files\firebird\examples\employee.fdb

注意:hostnameプロパティには、値を設定する必要はありません。

MySQL

mySQLのどのバージョンがサポートされていますか?

Currently MySQL 4.0, MySQL 4.1 and MySQL 5.0 are supported by de SQLdb components. Make sure you are using the correct connection component for your client library version. So if you have the client libraries installed for MySQL 4.1 then you have to use TMySQL41Connection component, even if the server is running version 4.0 or 5.0.

Pascal Data Objects

There is now an alternative. The functions introduced with MySQL 4.1 and 5.0 like prepared statements, binding, and stored procedures are supported by database API called Pascal Data Objects, which is inspired by PHP Data Objects. All the code and documentation necessary to use this new API is available on a Trac wiki:

https://trac.synsport.com:8000/index.php/pdo/wiki (username/password is guest/guest)

PostgreSQL

You can connect to PostgreSQL db by TPQConnection component. This component uses the PostgreSQL's libpq connection library[1], so you can easily connect almost every PostgreSQL db, but the component doesn't support the following connection options:

  • Port
  • ClientEncoding

Maybe there are other unsupported connection parameters.

--Jrmarino 11:28, 13 Mar 2006 (CET)