source: www/manuals/PHP_manual/function.odbc-connect.html@ 1

Last change on this file since 1 was 1, checked in by george, 17 years ago

Prvotní import všeho

File size: 3.6 KB
Line 
1<HTML
2><HEAD
3><TITLE
4>odbc_connect</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
8REL="HOME"
9TITLE="Manuál PHP"
10HREF="index.html"><LINK
11REL="UP"
12TITLE="Unified ODBC functions"
13HREF="ref.odbc.html"><LINK
14REL="PREVIOUS"
15TITLE="odbc_commit"
16HREF="function.odbc-commit.html"><LINK
17REL="NEXT"
18TITLE="odbc_cursor"
19HREF="function.odbc-cursor.html"><META
20HTTP-EQUIV="Content-type"
21CONTENT="text/html; charset=ISO-8859-2"></HEAD
22><BODY
23CLASS="refentry"
24BGCOLOR="#FFFFFF"
25TEXT="#000000"
26LINK="#0000FF"
27VLINK="#840084"
28ALINK="#0000FF"
29><DIV
30CLASS="NAVHEADER"
31><TABLE
32SUMMARY="Header navigation table"
33WIDTH="100%"
34BORDER="0"
35CELLPADDING="0"
36CELLSPACING="0"
37><TR
38><TH
39COLSPAN="3"
40ALIGN="center"
41>Manuál PHP</TH
42></TR
43><TR
44><TD
45WIDTH="10%"
46ALIGN="left"
47VALIGN="bottom"
48><A
49HREF="function.odbc-commit.html"
50ACCESSKEY="P"
51>Pøedcházející</A
52></TD
53><TD
54WIDTH="80%"
55ALIGN="center"
56VALIGN="bottom"
57></TD
58><TD
59WIDTH="10%"
60ALIGN="right"
61VALIGN="bottom"
62><A
63HREF="function.odbc-cursor.html"
64ACCESSKEY="N"
65>Dal¹í</A
66></TD
67></TR
68></TABLE
69><HR
70ALIGN="LEFT"
71WIDTH="100%"></DIV
72><H1
73><A
74NAME="function.odbc-connect"
75></A
76>odbc_connect</H1
77><DIV
78CLASS="refnamediv"
79><A
80NAME="AEN60153"
81></A
82><P
83> (PHP 3&#62;= 3.0.6, PHP 4 )</P
84>odbc_connect&nbsp;--&nbsp;Connect to a datasource</DIV
85><DIV
86CLASS="refsect1"
87><A
88NAME="AEN60156"
89></A
90><H2
91>Description</H2
92>resource <B
93CLASS="methodname"
94>odbc_connect</B
95> ( string dsn, string user, string password [, int cursor_type])<BR
96></BR
97><P
98>&#13; Returns an ODBC connection id or 0 (<TT
99CLASS="constant"
100><B
101>FALSE</B
102></TT
103>) on
104 error.
105 </P
106><P
107>&#13; The connection id returned by this functions is needed by other
108 ODBC functions. You can have multiple connections open at once.
109 The optional fourth parameter sets the type of cursor to be used
110 for this connection. This parameter is not normally needed, but
111 can be useful for working around problems with some ODBC drivers.
112 </P
113><P
114>&#13; With some ODBC drivers, executing a complex stored procedure may
115 fail with an error similar to: "Cannot open a cursor on a stored
116 procedure that has anything other than a single select statement
117 in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some
118 drivers don't support the optional row_number parameter in
119 <A
120HREF="function.odbc-fetch-row.html"
121><B
122CLASS="function"
123>odbc_fetch_row()</B
124></A
125>. SQL_CUR_USE_ODBC might help
126 in that case, too.
127 </P
128><P
129>&#13; The following constants are defined for cursortype:
130 </P
131><P
132>&#13; <P
133></P
134><UL
135><LI
136><P
137>&#13; SQL_CUR_USE_IF_NEEDED
138 </P
139></LI
140><LI
141><P
142>&#13; SQL_CUR_USE_ODBC
143 </P
144></LI
145><LI
146><P
147>&#13; SQL_CUR_USE_DRIVER
148 </P
149></LI
150><LI
151><P
152>&#13; SQL_CUR_DEFAULT
153 </P
154></LI
155></UL
156>
157 </P
158><P
159>&#13; For persistent connections see
160 <A
161HREF="function.odbc-pconnect.html"
162><B
163CLASS="function"
164>odbc_pconnect()</B
165></A
166>.
167 </P
168></DIV
169><DIV
170CLASS="NAVFOOTER"
171><HR
172ALIGN="LEFT"
173WIDTH="100%"><TABLE
174SUMMARY="Footer navigation table"
175WIDTH="100%"
176BORDER="0"
177CELLPADDING="0"
178CELLSPACING="0"
179><TR
180><TD
181WIDTH="33%"
182ALIGN="left"
183VALIGN="top"
184><A
185HREF="function.odbc-commit.html"
186ACCESSKEY="P"
187>Pøedcházející</A
188></TD
189><TD
190WIDTH="34%"
191ALIGN="center"
192VALIGN="top"
193><A
194HREF="index.html"
195ACCESSKEY="H"
196>Domù</A
197></TD
198><TD
199WIDTH="33%"
200ALIGN="right"
201VALIGN="top"
202><A
203HREF="function.odbc-cursor.html"
204ACCESSKEY="N"
205>Dal¹í</A
206></TD
207></TR
208><TR
209><TD
210WIDTH="33%"
211ALIGN="left"
212VALIGN="top"
213>odbc_commit</TD
214><TD
215WIDTH="34%"
216ALIGN="center"
217VALIGN="top"
218><A
219HREF="ref.odbc.html"
220ACCESSKEY="U"
221>Nahoru</A
222></TD
223><TD
224WIDTH="33%"
225ALIGN="right"
226VALIGN="top"
227>odbc_cursor</TD
228></TR
229></TABLE
230></DIV
231></BODY
232></HTML
233>
Note: See TracBrowser for help on using the repository browser.