File tree Expand file tree Collapse file tree 1 file changed +38
-2
lines changed
reference/uodbc/functions Expand file tree Collapse file tree 1 file changed +38
-2
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: 1248359f65f6d21492d8959df4dbe7df2c0f3053 Maintainer: takagi Status: ready -->
3
+ <!-- EN-Revision: 7990427082721b073c3b64967d945f71746b0b60 Maintainer: takagi Status: ready -->
4
+ <!-- Credits: mumumu -->
4
5
<refentry xml : id =" function.odbc-data-source" xmlns =" http://docbook.org/ns/docbook" >
5
6
<refnamediv >
6
7
<refname >odbc_data_source</refname >
7
- <refpurpose >現在の接続についての情報を返す </refpurpose >
8
+ <refpurpose >利用可能なDSNについての情報を返す </refpurpose >
8
9
</refnamediv >
9
10
<refsect1 role =" description" >
10
11
&reftitle.description;
47
48
&reftitle.returnvalues;
48
49
<para >
49
50
エラー時には &false; 、成功時には配列を返します。
51
+ 最後の利用可能なDSNを取得した後は、&null; を返します。
50
52
</para >
51
53
</refsect1 >
54
+
55
+ <refsect1 role =" examples" >
56
+ &reftitle.examples;
57
+ <example xml : id =" odbc-data-source.example.basic" >
58
+ <title >利用可能なDSNの一覧を表示する</title >
59
+ <programlisting role =" php" >
60
+ <![CDATA[
61
+ <?php
62
+ $conn = odbc_connect('dsn', 'user', 'pass');
63
+ $dsn_info = odbc_data_source($conn, SQL_FETCH_FIRST);
64
+ while ($dsn_info) {
65
+ print_r($dsn_info);
66
+ $dsn_info = odbc_data_source($conn, SQL_FETCH_NEXT);
67
+ }
68
+ ?>
69
+ ]]>
70
+ </programlisting >
71
+ &example.outputs.similar;
72
+ <screen >
73
+ <![CDATA[
74
+ Array
75
+ (
76
+ [server] => dsn
77
+ [description] => ODBC Driver 17 for SQL Server
78
+ )
79
+ Array
80
+ (
81
+ [server] => other_dsn
82
+ [description] => Microsoft Access Driver (*.mdb, *.accdb)
83
+ )]]>
84
+ </screen >
85
+ </example >
86
+ </refsect1 >
87
+
52
88
</refentry >
53
89
54
90
<!-- Keep this comment at the end of the file
You can’t perform that action at this time.
0 commit comments