Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "DBD::ADO 3" | |
132 | .TH DBD::ADO 3 "2002-10-01" "perl v5.8.0" "User Contributed Perl Documentation" | |
133 | .SH "NAME" | |
134 | DBD::ADO \- A DBI driver for Microsoft ADO (Active Data Objects) | |
135 | .SH "SYNOPSIS" | |
136 | .IX Header "SYNOPSIS" | |
137 | .Vb 1 | |
138 | \& use DBI; | |
139 | .Ve | |
140 | .PP | |
141 | .Vb 1 | |
142 | \& $dbh = DBI->connect("dbi:ADO:dsn", $user, $passwd); | |
143 | .Ve | |
144 | .PP | |
145 | .Vb 4 | |
146 | \& Options in the connect string: | |
147 | \& dbi:ADO:dsn;CommandTimeout=60 (your number) | |
148 | \& dbi:ADO:dsn;ConnectTimeout=60 (your number) | |
149 | \& or include both ConnectTimeout and CommandTimeout. | |
150 | .Ve | |
151 | .PP | |
152 | .Vb 3 | |
153 | \& The dsn may be a standard ODBC dsn or a dsn-less. | |
154 | \& See the ADO documentation for more information on | |
155 | \& the dsn-less connection. | |
156 | .Ve | |
157 | .PP | |
158 | .Vb 1 | |
159 | \& # See the DBI module documentation for full details | |
160 | .Ve | |
161 | .SH "DESCRIPTION" | |
162 | .IX Header "DESCRIPTION" | |
163 | The \s-1DBD::ADO\s0 module supports \s-1ADO\s0 access on a Win32 machine. | |
164 | \&\s-1DBD::ADO\s0 is written to support the standard \s-1DBI\s0 interface to | |
165 | data sources. | |
166 | .SH "Connection" | |
167 | .IX Header "Connection" | |
168 | .Vb 1 | |
169 | \& $dbh = DBI->connect("dbi:ADO:dsn", $user, $passwd, $attribs); | |
170 | .Ve | |
171 | .PP | |
172 | .Vb 1 | |
173 | \& Connection supports dsn and dsn-less calls. | |
174 | .Ve | |
175 | .PP | |
176 | .Vb 3 | |
177 | \& $dbh = DBI->connect( "dbi:ADO:File Name=oracle.udl", | |
178 | \& $user, $passwd, {RaiseError => [0|1], PrintError => [0|1], | |
179 | \& AutoCommit => [0|1]}); | |
180 | .Ve | |
181 | .PP | |
182 | .Vb 10 | |
183 | \& In addition the following attributes may be set in the connect string: | |
184 | \& Attributes | |
185 | \& CommandTimeout | |
186 | \& ConnectionString | |
187 | \& ConnectionTimeout | |
188 | \& CursorLocation | |
189 | \& DefaultDatabase | |
190 | \& IsolationLevel | |
191 | \& Mode | |
192 | \& Provider | |
193 | .Ve | |
194 | .PP | |
195 | .Vb 2 | |
196 | \& WARNING: The application is responsible for passing the correct | |
197 | \& information when setting any of these attributes. | |
198 | .Ve | |
199 | .SH "Functions support" | |
200 | .IX Header "Functions support" | |
201 | .Vb 2 | |
202 | \& Using the standard DBI function call | |
203 | \& $dbh->func( arguments, 'function name') | |
204 | .Ve | |
205 | .PP | |
206 | .Vb 2 | |
207 | \& You may access the following functions: (case sensitave) | |
208 | \& OpenSchema | |
209 | .Ve | |
210 | .PP | |
211 | .Vb 1 | |
212 | \& All functions return a valid statement handle upon success. | |
213 | .Ve | |
214 | .PP | |
215 | .Vb 5 | |
216 | \& OpenSchema supports the following arguments: | |
217 | \& Any valid ADO Schema name such as | |
218 | \& adSchemaCatalogs | |
219 | \& adSchemaIndexes | |
220 | \& adSchemaProviderTypes | |
221 | .Ve | |
222 | .PP | |
223 | .Vb 2 | |
224 | \& example: | |
225 | \& my $sth = $dbh->func( 'adSchemaProviderTypes', 'OpenSchema' ); | |
226 | .Ve | |
227 | .SH "Enhanced DBI Methods" | |
228 | .IX Header "Enhanced DBI Methods" | |
229 | .Sh "table_info" | |
230 | .IX Subsection "table_info" | |
231 | \&\fBWarning:\fR This method is experimental and may change or disappear. | |
232 | .PP | |
233 | .Vb 1 | |
234 | \& $sth = $dbh->table_info(\e%attr); | |
235 | .Ve | |
236 | .PP | |
237 | .Vb 6 | |
238 | \& $sth = $dbh->table_info({ | |
239 | \& TABLE_TYPE => 'VIEW', | |
240 | \& ADO_Columns => 1, | |
241 | \& Trim_Catalog => 0, | |
242 | \& Filter => q{TABLE_NAME LIKE 'C%'}, | |
243 | \& }); | |
244 | .Ve | |
245 | .PP | |
246 | Returns an active statement handle that can be used to fetch | |
247 | information about tables and views that exist in the database. | |
248 | By default the handle contains the columns described in the \s-1DBI\s0 documentation: | |
249 | .PP | |
250 | .Vb 1 | |
251 | \& TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS | |
252 | .Ve | |
253 | .RE | |
254 | .IP "\fBADO_Columns\fR" | |
255 | .IX Item "ADO_Columns" | |
256 | Additional ADO-only fields will be included if the ADO_Columns attribute | |
257 | is set to true: | |
258 | .PP | |
259 | .Vb 1 | |
260 | \& %attr = (ADO_Columns => 1); | |
261 | .Ve | |
262 | .RE | |
263 | .IP "\fBTrim_Catalog\fR" | |
264 | .IX Item "Trim_Catalog" | |
265 | Some \s-1ADO\s0 providers include path info in the \s-1TABLE_CAT\s0 column. | |
266 | This information will be trimmed if the Trim_Catalog attribute is set to true: | |
267 | .PP | |
268 | .Vb 1 | |
269 | \& %attr = (Trim_Catalog => 1); | |
270 | .Ve | |
271 | .RE | |
272 | .IP "\fBCriteria\fR" | |
273 | .IX Item "Criteria" | |
274 | The \s-1ADO\s0 driver allows column criteria to be specified. In this way the | |
275 | record set can be restricted, for example, to only include tables of type '\s-1VIEW\s0': | |
276 | .PP | |
277 | .Vb 1 | |
278 | \& %attr = (TABLE_TYPE => 'VIEW') | |
279 | .Ve | |
280 | .PP | |
281 | You can add criteria for any of the following columns: | |
282 | .PP | |
283 | .Vb 1 | |
284 | \& TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE | |
285 | .Ve | |
286 | .RE | |
287 | .IP "\fBFilter\fR" | |
288 | .IX Item "Filter" | |
289 | The \s-1ADO\s0 driver also allows the recordset to be filtered on a Criteria string: | |
290 | a string made up of one or more individual clauses concatenated with \s-1AND\s0 or \s-1OR\s0 operators. | |
291 | .PP | |
292 | .Vb 1 | |
293 | \& %attr = (Filter => q{TABLE_TYPE LIKE 'SYSTEM%'}) | |
294 | .Ve | |
295 | .PP | |
296 | The criteria string is made up of clauses in the form FieldName\-Operator\-Value. | |
297 | This is more flexible than using column criteria in that the filter allows a number of operators: | |
298 | .PP | |
299 | .Vb 1 | |
300 | \& <, >, <=, >=, <>, =, or LIKE | |
301 | .Ve | |
302 | .PP | |
303 | The Fieldname must be one of the \s-1ADO\s0 '\s-1TABLES\s0 Rowset' column names: | |
304 | .PP | |
305 | .Vb 2 | |
306 | \& TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, DESCRIPTION, | |
307 | \& TABLE_GUID, TABLE_PROPID, DATE_CREATED, DATE_MODIFIED | |
308 | .Ve | |
309 | .PP | |
310 | Value is the value with which you will compare the field values | |
311 | (for example, 'Smith', #8/24/95#, 12.345, or \f(CW$50\fR.00). | |
312 | Use single quotes with strings and pound signs (#) with dates. | |
313 | For numbers, you can use decimal points, dollar signs, and scientific notation. | |
314 | If Operator is \s-1LIKE\s0, Value can use wildcards. | |
315 | Only the asterisk (*) and percent sign (%) wild cards are allowed, | |
316 | and they must be the last character in the string. Value cannot be null. | |
317 | .Sh "tables" | |
318 | .IX Subsection "tables" | |
319 | \&\fBWarning:\fR This method is experimental and may change or disappear. | |
320 | .PP | |
321 | .Vb 1 | |
322 | \& @names = $dbh->tables(\e%attr); | |
323 | .Ve | |
324 | .PP | |
325 | Returns a list of table and view names. | |
326 | Accepts any of the attributes described in the table_info method: | |
327 | .PP | |
328 | .Vb 1 | |
329 | \& @names = $dbh->tables({ TABLE_TYPE => 'VIEW' }); | |
330 | .Ve | |
331 | .SH "Warnings" | |
332 | .IX Header "Warnings" | |
333 | .Vb 6 | |
334 | \& Support for type_info_all is supported, however, you're not using | |
335 | \& a true OLE DB provider (using the MS OLE DB -> ODBC), the first | |
336 | \& hash may not be the "best" solution for the data type. | |
337 | \& adSchemaProviderTypes does provide for a "best match" column, however | |
338 | \& the MS OLE DB -> ODBC provider does not support the best match. | |
339 | \& Currently the types are sorted by DATA_TYPE BEST_MATCH IS_LONG ... | |
340 | .Ve | |
341 | .SH "ADO" | |
342 | .IX Header "ADO" | |
343 | It is strongly recommended that you use the latest version of \s-1ADO\s0 | |
344 | (2.1 at the time this was written). You can download it from: | |
345 | .PP | |
346 | .Vb 1 | |
347 | \& http://www.microsoft.com/Data/download.htm | |
348 | .Ve | |
349 | .SH "AUTHORS" | |
350 | .IX Header "AUTHORS" | |
351 | Phlip and Tim Bunce. With many thanks to Jan Dubois, Jochen Wiedmann | |
352 | and Thomas Lowery for additions, debuggery and general help. | |
353 | .SH "SEE ALSO" | |
354 | .IX Header "SEE ALSO" | |
355 | \&\s-1ADO\s0 Reference book: \s-1ADO\s0 2.0 Programmer's Reference, David Sussman and | |
356 | Alex Homer, Wrox, \s-1ISBN\s0 1\-861001\-83\-5. If there's anything better please | |
357 | let me know. | |
358 | .PP | |
359 | http://www.able\-consulting.com/tech.htm |