📄 pgsql.html
字号:
<html>
<head>
<title>Zeos Database Objects PostgreSQL components</title>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Win1251">
</head>
<body link="#00637b" alink="#00637B" vlink="#000000">
<center>
<table width="100%" border="0" cellpading="0" cellspacing="0">
<tr>
<td bgcolor="#00637B" align=center valign=center>
<font color="White" size="6"><b>ZEOS Database Objects<br>
</b></font>
<font color="White" size="6"><b>PostgreSQL Components</b></font>
</tr>
</table>
<a name="Contents"></a>
<h2>Contents</h2>
</center>
<a name="Contents"></a>
<ul>
<li><a href="#Database">TZPgSQLDatabase</a> - component for connection to the PostgreSQL database
<li><a href="#Monitor">TZPgSQLMonitor</a> - component for tracing of outgoing queries
<li><a href="#Query">TZPgSQLQuery</a> - component for perfoming queries to PostgreSQL server
<li><a href="#Table">TZPgSQLTable</a> - component for representing SQL query as a TTable
<li><a href="#Transact">TZPgSQLTransact</a> - component of server transactions
</ul>
<hr>
<a name="Database"></a>
<center>
<h2><b>TZPgSQLDatabase</b></h2>
<a href="#Database_property"><font size=2> Properties |</font></a>
<a href="#Database_methods"><font size=2> Methods |</font></a>
<a href="#Database_events"><font size=2> Events </font></a>
</center>
<p>
Component for connections to the PostgreSQL database server. The dynamic load library <b>libpg.dll</b> is necessary.
<p>
Hierarchy: TObject->TPersistent->TComponent->TZDatabase->TZPgSQLDatabase
<p>
<a name="Database_property"></a>
<table width="100%" border="1" cellpading="0" cellspacing="0">
<tr bgcolor="#00637B" align=center valign=center>
<td colspan=2 align=center valign=center><font color="White">
TZPgSQLDatabase properties
</font>
</tr>
<tr>
<td width=30%><b>Handle:TDirConnect</b>
<td>Descriptor of direct connection to the database
</tr>
<tr>
<td><b>Host:ShortString</b>
<td>PostgreSQL database server host name
</tr>
<tr>
<td><b>Database:ShortString</b>
<td>Database name
</tr>
<tr>
<td><b>Login:ShortString</b>
<td>User name for connection
</tr>
<tr>
<td><b>Password:ShortString</b>
<td>Password for connection to the database
</tr>
<tr>
<td><b>LoginPromt:Boolean</b>
<td>When the value is switched to <b>true</b>, window for entering user name and password appears.
</tr>
<tr>
<td><b>Port:ShortString</b>
<td>Port number for connection to PostgreSQL server
</tr>
<tr>
<td><b>Connected:Boolean</b>
<td>Indicates the connection to database. When the value is switched to <b>true</b>,
connection to the database occurs. Method <b>Connect</b> does the same.
</tr>
<tr>
<td><b>Encoding:TEncodingType</b>
<td>Indicates the local code page of symbols for representing contents of the database content.
The following table lists all possible values:
<ul>
<li>etNone
<li>et866
<li>etCp1251
<li>etISO88592
<li>etKOI8r
</ul>
</tr>
</table>
<center>
<font size=2>
<a href="#Database">Back | </a>
<a href="#Contents">Contents </a>
</font>
</center>
<p>
<a name="Database_methods"></a>
<table width="100%" border="1" cellpading="0" cellspacing="0">
<tr bgcolor="#00637B" align=center valign=center>
<td colspan=2 align=center valign=center><font color="White">
TZPgSQLDatabase methods
</font>
</tr>
<tr>
<td width=30%><b>procedure Connect()</b>
<td>Connects to the database
</tr>
<tr>
<td><b>procedure Disconnect()</b>
<td>Disconnects from the database
</tr>
</table>
<center>
<font size=2>
<a href="#Database">Back | </a>
<a href="#Contents">Contents </a>
</font>
</center>
<p>
<a name="Database_events"></a>
<table width="100%" border="1" cellpading="0" cellspacing="0">
<tr bgcolor="#00637B" align=center valign=center>
<td colspan=2 align=center valign=center><font color="White">
TZPgSQLDatabase events
</font>
</tr>
<tr>
<td width=30%><b>procedure AfterConnect(Sender:TObject)</b>
<td>Occurs after an application completes connecting to a database
</tr>
<tr>
<td><b>procedure AfterDisconnect(Sender:TObject)</b>
<td>Occurs after an application completes disconnecting from a database
</tr>
<tr>
<td><b>procedure BeforeConnect(Sender:TObject)</b>
<td>Occurs before an application completes connecting to a database
</tr>
<tr>
<td><b>procedure BeforeDisconnect(Sender:TObject)</b>
<td>Occurs before an application completes disconnecting from a database
</tr>
</table>
<center>
<font size=2>
<a href="#Database">Back | </a>
<a href="#Contents">Contents </a>
</font>
</center>
<hr>
<a name="Monitor"></a>
<center>
<h2><b>TZPgSQLMonitor</b></h2>
<a href="#Monitor_events"><font size=2> Events </font></a>
</center>
<p>
Component for the tracing of an outgoing queries. It have the one event,
which occurs when any SQL queries is processed by PostgreSQL server. It returns
the outgoing query and its result.
<p>
Hierarchy: TObject->TPersistent->TComponent->TZMonitor->TZPgSQLMonitor
<p>
<a name="Monitor_events"></a>
<table width="100%" border="1" cellpading="0" cellspacing="0">
<tr bgcolor="#00637B" align=center valign=center>
<td colspan=2 align=center valign=center><font color="White">
TZPgSQLMonitor events
</font>
</tr>
<tr>
<td width=30%><b>procedure MonitorEvent(Sql, Result: String)</b>
<td>Event occurs when PostgreSQL server have processed the query.
The returning values:
<ul>
<li><b>Sql</b> - text of the outgoing query
<li><b>Result</b> - the result, which includes errors and time of processing.
</ul>
</tr>
</table>
<center>
<font size=2>
<a href="#Monitor">Back | </a>
<a href="#Contents">Contents </a>
</font>
</center>
<hr><a name="Query"></a>
<center>
<h2><b>TZPgSQLQuery</b></h2>
<a href="#Query_property"><font size=2> Properties |</font></a>
<a href="#Query_methods"><font size=2> Methods |</font></a>
<a href="#Query_events"><font size=2> Events </font></a>
</center>
<p>
Component for perfoming SQL queries to PostgreSQL server.
It's used for sending SQL statements to PostgreSQL server.
镥疱覃腙
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -