2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2007-06-15 00:16:45 +00:00
|
|
|
<!-- $Revision: 1.7 $ -->
|
2005-03-30 16:03:26 +00:00
|
|
|
<refentry id="function.sybase-pconnect">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>sybase_pconnect</refname>
|
|
|
|
<refpurpose>Open persistent Sybase connection</refpurpose>
|
|
|
|
</refnamediv>
|
2007-06-15 00:16:45 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-06-15 00:16:44 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>resource</type><methodname>sybase_pconnect</methodname>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>servername</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>username</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>password</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>charset</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>string</type><parameter>appname</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
2005-03-30 16:03:26 +00:00
|
|
|
<para>
|
|
|
|
<function>sybase_pconnect</function> acts very much like
|
|
|
|
<function>sybase_connect</function> with two major differences.
|
|
|
|
</para>
|
2007-06-15 00:16:44 +00:00
|
|
|
<para>
|
2005-03-30 16:03:26 +00:00
|
|
|
First, when connecting, the function would first try to find a
|
|
|
|
(persistent) link that's already open with the same host,
|
|
|
|
username and password. If one is found, an identifier for it
|
|
|
|
will be returned instead of opening a new connection.
|
|
|
|
</para>
|
2007-06-15 00:16:44 +00:00
|
|
|
<para>
|
2005-03-30 16:03:26 +00:00
|
|
|
Second, the connection to the SQL server will not be closed when
|
|
|
|
the execution of the script ends. Instead, the link will remain
|
|
|
|
open for future use (<function>sybase_close</function> will not
|
2005-06-06 11:48:42 +00:00
|
|
|
close links established by <function>sybase_pconnect</function>).
|
2005-03-30 16:03:26 +00:00
|
|
|
</para>
|
2007-06-15 00:16:44 +00:00
|
|
|
<para>
|
2005-03-30 16:03:26 +00:00
|
|
|
This type of links is therefore called 'persistent'.
|
|
|
|
</para>
|
2007-06-15 00:16:45 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
2005-03-30 16:03:26 +00:00
|
|
|
<para>
|
2007-06-15 00:16:45 +00:00
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>servername</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The servername argument has to be a valid servername that is defined
|
|
|
|
in the 'interfaces' file.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>username</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Sybase user name
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>password</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Password associated with <parameter>username</parameter>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>charset</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>appname</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
2005-03-30 16:03:26 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-15 00:16:45 +00:00
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Returns a positive Sybase persistent link identifier on success, or
|
|
|
|
&false; on error.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>sybase_connect</function></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2005-03-30 16:03:26 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|