<HTML ><HEAD ><TITLE >sesam_connect</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual de PHP" HREF="index.html"><LINK REL="UP" TITLE="SESAM database functions" HREF="ref.sesam.html"><LINK REL="PREVIOUS" TITLE="sesam_commit" HREF="function.sesam-commit.html"><LINK REL="NEXT" TITLE="sesam_diagnostic" HREF="function.sesam-diagnostic.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual de PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.sesam-commit.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.sesam-diagnostic.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.sesam-connect" ></A >sesam_connect</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN69027" ></A ><P > (PHP 3 CVS only)</P >sesam_connect -- Open SESAM database connection</DIV ><DIV CLASS="refsect1" ><A NAME="AEN69030" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >sesam_connect</B > ( string catalog, string schema, string user)<BR ></BR ><P > Returns <TT CLASS="constant" ><B >TRUE</B ></TT > if a connection to the SESAM database was made, or <TT CLASS="constant" ><B >FALSE</B ></TT > on error. </P ><P > <B CLASS="function" >sesam_connect()</B > establishes a connection to an SESAM database handler task. The connection is always "persistant" in the sense that only the very first invocation will actually load the driver from the configured SESAM OML PLAM library. Subsequent calls will reuse the driver and will immediately use the given catalog, schema, and user. </P ><P > When creating a database, the <TT CLASS="parameter" ><I >"catalog"</I ></TT > name is specified in the SESAM configuration directive <B CLASS="command" >//ADD-SQL-DATABASE-CATALOG-LIST ENTRY-1 = *CATALOG(CATALOG-NAME = catalogname,...)</B > </P ><P > The <TT CLASS="parameter" ><I >"schema"</I ></TT > references the desired database schema (see SESAM handbook). </P ><P > The <TT CLASS="parameter" ><I >"user"</I ></TT > argument references one of the users which are allowed to access this <TT CLASS="parameter" ><I >"catalog"</I ></TT > / <TT CLASS="parameter" ><I >"schema"</I ></TT > combination. Note that <TT CLASS="parameter" ><I >"user"</I ></TT > is completely independent from both the system's user id's and from HTTP user/password protection. It appears in the SESAM configuration only. </P ><P > See also <A HREF="function.sesam-disconnect.html" ><B CLASS="function" >sesam_disconnect()</B ></A >. <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN69061" ></A ><P ><B >Ejemplo 1. Connect to a SESAM database</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="php" ><?php if (!sesam_connect ("mycatalog", "myschema", "otto") die("Unable to connect to SESAM"; ?></PRE ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.sesam-commit.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Inicio</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.sesam-diagnostic.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >sesam_commit</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.sesam.html" ACCESSKEY="U" >Subir</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >sesam_diagnostic</TD ></TR ></TABLE ></DIV ></BODY ></HTML >