Skip to content

Commit eb0c380

Browse files
committed
Updated odbc_connect and odbc_pconnect
1 parent ae14882 commit eb0c380

File tree

2 files changed

+90
-4
lines changed

2 files changed

+90
-4
lines changed

reference/uodbc/functions/odbc-connect.xml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<methodsynopsis>
1212
<type class="union"><type>resource</type><type>false</type></type><methodname>odbc_connect</methodname>
1313
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
14-
<methodparam><type>string</type><parameter>user</parameter></methodparam>
15-
<methodparam><type>string</type><parameter>password</parameter></methodparam>
14+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>user</parameter><initializer>&null;</initializer></methodparam>
15+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
1616
<methodparam choice="opt"><type>int</type><parameter>cursor_option</parameter><initializer><constant>SQL_CUR_USE_DRIVER</constant></initializer></methodparam>
1717
</methodsynopsis>
1818
<simpara>
@@ -49,6 +49,9 @@
4949
<listitem>
5050
<para>
5151
The username.
52+
This parameter is ignored if <parameter>dsn</parameter> contains <literal>uid</literal>.
53+
If need to connect without specifying a <parameter>user</parameter>,
54+
please pass &null;.
5255
</para>
5356
</listitem>
5457
</varlistentry>
@@ -57,6 +60,9 @@
5760
<listitem>
5861
<para>
5962
The password.
63+
This parameter is ignored if <parameter>dsn</parameter> contains <literal>pwd</literal>.
64+
If need to connect without specifying a <parameter>password</parameter>,
65+
please pass &null;.
6066
</para>
6167
</listitem>
6268
</varlistentry>
@@ -103,6 +109,46 @@
103109
</para>
104110
</refsect1>
105111

112+
<refsect1 role="changelog">
113+
&reftitle.changelog;
114+
<informaltable>
115+
<tgroup cols="2">
116+
<thead>
117+
<row>
118+
<entry>&Version;</entry>
119+
<entry>&Description;</entry>
120+
</row>
121+
</thead>
122+
<tbody>
123+
<row>
124+
<entry>8.4.0</entry>
125+
<entry>
126+
<parameter>user</parameter> and <parameter>password</parameter> are now nullable
127+
and are optional parameters with an initial value of &null;.
128+
</entry>
129+
</row>
130+
<row>
131+
<entry>8.4.0</entry>
132+
<entry>
133+
When passing an empty <type>string</type> to <parameter>password</parameter>, <literal>pwd</literal>
134+
was not included in the connection string created until now, but the behavior has been changed to include
135+
it as an empty string. Passing &null; for <parameter>password</parameter> results in the same behavior as before.
136+
</entry>
137+
</row>
138+
<row>
139+
<entry>8.4.0</entry>
140+
<entry>
141+
Changed the behavior to ignore <parameter>user</parameter> and <parameter>password</parameter> separately when
142+
<parameter>dsn</parameter> contains <literal>uid</literal> or <literal>pwd</literal>.
143+
Previously, if included only either <literal>uid</literal> or <literal>pwd</literal> in a <parameter>dsn</parameter>,
144+
both <parameter>user</parameter> and <parameter>password</parameter> were ignored.
145+
</entry>
146+
</row>
147+
</tbody>
148+
</tgroup>
149+
</informaltable>
150+
</refsect1>
151+
106152
<refsect1 role="examples">
107153
&reftitle.examples;
108154
<para>

reference/uodbc/functions/odbc-pconnect.xml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<methodsynopsis>
1212
<type class="union"><type>resource</type><type>false</type></type><methodname>odbc_pconnect</methodname>
1313
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
14-
<methodparam><type>string</type><parameter>user</parameter></methodparam>
15-
<methodparam><type>string</type><parameter>password</parameter></methodparam>
14+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>user</parameter><initializer>&null;</initializer></methodparam>
15+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
1616
<methodparam choice="opt"><type>int</type><parameter>cursor_option</parameter><initializer><constant>SQL_CUR_USE_DRIVER</constant></initializer></methodparam>
1717
</methodsynopsis>
1818
<para>
@@ -45,6 +45,46 @@
4545
</para>
4646
</refsect1>
4747

48+
<refsect1 role="changelog">
49+
&reftitle.changelog;
50+
<informaltable>
51+
<tgroup cols="2">
52+
<thead>
53+
<row>
54+
<entry>&Version;</entry>
55+
<entry>&Description;</entry>
56+
</row>
57+
</thead>
58+
<tbody>
59+
<row>
60+
<entry>8.4.0</entry>
61+
<entry>
62+
<parameter>user</parameter> and <parameter>password</parameter> are now nullable
63+
and are optional parameters with an initial value of &null;.
64+
</entry>
65+
</row>
66+
<row>
67+
<entry>8.4.0</entry>
68+
<entry>
69+
When passing an empty <type>string</type> to <parameter>password</parameter>, <literal>pwd</literal>
70+
was not included in the connection string created until now, but the behavior has been changed to include
71+
it as an empty string. Passing &null; for <parameter>password</parameter> results in the same behavior as before.
72+
</entry>
73+
</row>
74+
<row>
75+
<entry>8.4.0</entry>
76+
<entry>
77+
Changed the behavior to ignore <parameter>user</parameter> and <parameter>password</parameter> separately when
78+
<parameter>dsn</parameter> contains <literal>uid</literal> or <literal>pwd</literal>.
79+
Previously, if included only either <literal>uid</literal> or <literal>pwd</literal> in a <parameter>dsn</parameter>,
80+
both <parameter>user</parameter> and <parameter>password</parameter> were ignored.
81+
</entry>
82+
</row>
83+
</tbody>
84+
</tgroup>
85+
</informaltable>
86+
</refsect1>
87+
4888
<refsect1 role="notes">
4989
&reftitle.notes;
5090
<note>

0 commit comments

Comments
 (0)