Difference between revisions of "Lazarus DB Faq/zh CN"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{Lazarus DB Faq}}
 
{{Lazarus DB Faq}}
  
== 常规 ==
+
== 通用 ==
 +
这个FAQ涵盖了 Lazarus 数据库编程。
  
这个FAQ将指导您用Lazarus编写数据库程序
+
=== 在哪里找到更多信息 ===
 +
数据库:
 +
* 查看 [[Databases/zh_CN|数据库]] 以及有关使用数据库 SQLQuery 的文章。
  
 +
=== 在哪里找数据库组件 ===
 +
目前,SQLdb 组件是 Lazarus 和 FPC 的一部分,最小或最大安装时,在最近的版本被默认安装。
  
=== 哪里能找到更多的 FAQ? ===
+
手动安装:你可以在 [$LazarusDir]/components 里看到 SQLdb 目录。安装 sqldblaz.lpk ,你可以连接到 MySQL, Interbase / Firebird, Postgres, MS SQL 和 Sybase ASE(需要 FPC 2.6.1+),Oracle 服务器。
  
请参看官方网站www.lazarus.freepascal.org.也有另一常见问题和答案.[[Lazarus Faq|Here]]你将发现a,页其从www.lazarus.freepascal.org一次开始阿斯一份常见问题和答案的.
+
查看 [[Install Packages/zh_CN|安装包]] 有关的安装包帮助。
  
=== 哪里能找到更多的数据库组件? ===
+
=== 支持的数据库 ===
 +
* 查看 [[Lazarus_Database_Overview|Lazarus 数据库概述]] 什么数据库是由 SQLDB 支持的列表。
  
At the moment the SQLdb components are part of the Lazarus package, you only need to install them. If you look in the [$LazarusDir]/components you will see a subdirectory SQLdb. Install the sqldblaz.lpk and you will be able to connect to MySQL, Interbase / Firebird and Postgres servers.
+
=== 已知问题===
Look [[Install Packages|here]] for help on installing packages.
+
* 查看 [[fcl-db#Known%20issues/shortcomings|已知问题/缺点]]
  
=== 还有其它组件吗? ===
+
=== 其他的组件? ===
 +
* 查看 [[Lazarus_Database_Overview|Lazarus 数据库概述]] 是什么数据库用什么组件的列表。
  
Yes. The [http://zeoslib.sourceforge.net/index.php ZEOS components] have been ported to Lazarus as well.
+
=== Lazarus 和 FPC 文档 ===
<br>You have to download ZEOSDBO_Rework from [http://sourceforge.net/cvs/?group_id=35994 ZEOS cvs].
+
在 Lazarus 可视化数据库控件上使用 FPC 数据库代码. 请看 [http://www.freepascal.org/docs-html/fcl/sqldb/index.html SQLDB 文档] 上的更多信息。
<br>See also this tutorial for [[Zeos_tutorial|Zeos]].
 
<br>[http://pdo.sourceforge.net Pascal Data Objects] works equally with Delphi and FPC 2.0 (MySQL and Firebird)
 
  
== IB / FB ==
+
SQLDB 背景信息:[[SqlDBHowto]]
  
=== 我怎样从Linux连接到Windows服务器上呢? ===
+
TSQLQuery 的更多信息:[[Working With TSQLQuery]]
Entering the correct path to a database on a Windows server from a Linux client is not very clear.
 
  
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.
+
=== Lazarus 文档 ===
 +
* 一些在各种 FPC 与 Lazarus 组件间交互的信息:[[SQLdb Programming Reference/zh_CN|编程参考]]
  
Then entering the following databasename 
+
== 参见==
192.168.2.100:F:\Program Files\firebird\examples\employee.fdb
+
* [[Databases/zh_CN|数据库]]
in your IBConnection will connect to the required database.
+
* [[Lazarus_Database_Overview|Lazarus 数据库概述]]
 
+
* [[SQLdb Tutorial1]] - 参见教程2、3:一系列 Lazarus 数据库教程
Note that you don't have to enter a value for the hostname property!
 
 
 
== 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 sourceforge:
 
 
 
http://pdo.sourceforge.net
 
 
 
Jan 30, 2007: PDO has added drivers for Firebird 1.5 and 2.0
 
 
 
== PostgreSQL ==
 
 
 
You can connect to PostgreSQL db by TPQConnection component. This component uses the PostgreSQL's libpq connection library[http://www.postgresql.org/docs/8.0/interactive/libpq.html], 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.
 
  
 +
[[Category:Databases]]
 +
[[Category:FPC]]
 +
[[Category:Lazarus]]
 
[[Category:zh]]
 
[[Category:zh]]

Revision as of 11:02, 29 July 2014

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

通用

这个FAQ涵盖了 Lazarus 数据库编程。

在哪里找到更多信息

数据库:

  • 查看 数据库 以及有关使用数据库 SQLQuery 的文章。

在哪里找数据库组件

目前,SQLdb 组件是 Lazarus 和 FPC 的一部分,最小或最大安装时,在最近的版本被默认安装。

手动安装:你可以在 [$LazarusDir]/components 里看到 SQLdb 目录。安装 sqldblaz.lpk ,你可以连接到 MySQL, Interbase / Firebird, Postgres, MS SQL 和 Sybase ASE(需要 FPC 2.6.1+),Oracle 服务器。

查看 安装包 有关的安装包帮助。

支持的数据库

已知问题

其他的组件?

Lazarus 和 FPC 文档

在 Lazarus 可视化数据库控件上使用 FPC 数据库代码. 请看 SQLDB 文档 上的更多信息。

SQLDB 背景信息:SqlDBHowto

TSQLQuery 的更多信息:Working With TSQLQuery

Lazarus 文档

  • 一些在各种 FPC 与 Lazarus 组件间交互的信息:编程参考

参见