| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<HTML |
| 3 |
><HEAD |
| 4 |
><TITLE |
| 5 |
>Retrieving Field Meta-data</TITLE |
| 6 |
><META |
| 7 |
NAME="GENERATOR" |
| 8 |
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK |
| 9 |
REL="HOME" |
| 10 |
TITLE="Database Independent Abstraction Layer for C" |
| 11 |
HREF="index.html"><LINK |
| 12 |
REL="UP" |
| 13 |
TITLE="libdbi API Reference" |
| 14 |
HREF="reference.html"><LINK |
| 15 |
REL="PREVIOUS" |
| 16 |
TITLE="Managing Results" |
| 17 |
HREF="reference-results.html"><LINK |
| 18 |
REL="NEXT" |
| 19 |
TITLE="Retrieving Field Data by Name" |
| 20 |
HREF="reference-field.html"></HEAD |
| 21 |
><BODY |
| 22 |
CLASS="SECTION" |
| 23 |
BGCOLOR="#FFFFFF" |
| 24 |
TEXT="#000000" |
| 25 |
LINK="#0000FF" |
| 26 |
VLINK="#840084" |
| 27 |
ALINK="#0000FF" |
| 28 |
><DIV |
| 29 |
CLASS="NAVHEADER" |
| 30 |
><TABLE |
| 31 |
SUMMARY="Header navigation table" |
| 32 |
WIDTH="100%" |
| 33 |
BORDER="0" |
| 34 |
CELLPADDING="0" |
| 35 |
CELLSPACING="0" |
| 36 |
><TR |
| 37 |
><TH |
| 38 |
COLSPAN="3" |
| 39 |
ALIGN="center" |
| 40 |
>Database Independent Abstraction Layer for C: libdbi Programmer's Guide</TH |
| 41 |
></TR |
| 42 |
><TR |
| 43 |
><TD |
| 44 |
WIDTH="10%" |
| 45 |
ALIGN="left" |
| 46 |
VALIGN="bottom" |
| 47 |
><A |
| 48 |
HREF="reference-results.html" |
| 49 |
ACCESSKEY="P" |
| 50 |
>Prev</A |
| 51 |
></TD |
| 52 |
><TD |
| 53 |
WIDTH="80%" |
| 54 |
ALIGN="center" |
| 55 |
VALIGN="bottom" |
| 56 |
>Chapter 7. libdbi API Reference</TD |
| 57 |
><TD |
| 58 |
WIDTH="10%" |
| 59 |
ALIGN="right" |
| 60 |
VALIGN="bottom" |
| 61 |
><A |
| 62 |
HREF="reference-field.html" |
| 63 |
ACCESSKEY="N" |
| 64 |
>Next</A |
| 65 |
></TD |
| 66 |
></TR |
| 67 |
></TABLE |
| 68 |
><HR |
| 69 |
ALIGN="LEFT" |
| 70 |
WIDTH="100%"></DIV |
| 71 |
><DIV |
| 72 |
CLASS="SECTION" |
| 73 |
><H1 |
| 74 |
CLASS="SECTION" |
| 75 |
><A |
| 76 |
NAME="REFERENCE-FIELD-META" |
| 77 |
>7.7. Retrieving Field Meta-data</A |
| 78 |
></H1 |
| 79 |
><DIV |
| 80 |
CLASS="SECTION" |
| 81 |
><H2 |
| 82 |
CLASS="SECTION" |
| 83 |
><A |
| 84 |
NAME="DBI-RESULT-GET-FIELD-LENGTH" |
| 85 |
>7.7.1. dbi_result_get_field_length</A |
| 86 |
></H2 |
| 87 |
><DIV |
| 88 |
CLASS="FUNCSYNOPSIS" |
| 89 |
><P |
| 90 |
></P |
| 91 |
><A |
| 92 |
NAME="AEN2467" |
| 93 |
></A |
| 94 |
><P |
| 95 |
><CODE |
| 96 |
><CODE |
| 97 |
CLASS="FUNCDEF" |
| 98 |
>size_t <B |
| 99 |
CLASS="FSFUNC" |
| 100 |
>dbi_result_get_field_length</B |
| 101 |
></CODE |
| 102 |
>(dbi_result <VAR |
| 103 |
CLASS="PDPARAM" |
| 104 |
>Result</VAR |
| 105 |
>, const char *<VAR |
| 106 |
CLASS="PDPARAM" |
| 107 |
>const char *fieldname</VAR |
| 108 |
>);</CODE |
| 109 |
></P |
| 110 |
><P |
| 111 |
></P |
| 112 |
></DIV |
| 113 |
><P |
| 114 |
>Returns the length of the value stored in the specified field which contains a string or a binary string.</P |
| 115 |
><P |
| 116 |
></P |
| 117 |
><DIV |
| 118 |
CLASS="VARIABLELIST" |
| 119 |
><DL |
| 120 |
><DT |
| 121 |
>Arguments</DT |
| 122 |
><DD |
| 123 |
><P |
| 124 |
><TT |
| 125 |
CLASS="LITERAL" |
| 126 |
>Result</TT |
| 127 |
>: The target query result.</P |
| 128 |
><P |
| 129 |
><TT |
| 130 |
CLASS="LITERAL" |
| 131 |
>fieldname</TT |
| 132 |
>: The name of the target field.</P |
| 133 |
></DD |
| 134 |
><DT |
| 135 |
>Returns</DT |
| 136 |
><DD |
| 137 |
><P |
| 138 |
>The length in bytes of the target field data, excluding the terminating zero byte, or DBI_LENGTH_ERROR in case of an error. The return value is 0 for field types other than string or binary string. In case of an error the <A |
| 139 |
HREF="errornumbers.html" |
| 140 |
>error number</A |
| 141 |
> is one of DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, or DBI_ERROR_BADIDX.</P |
| 142 |
></DD |
| 143 |
></DL |
| 144 |
></DIV |
| 145 |
></DIV |
| 146 |
><DIV |
| 147 |
CLASS="SECTION" |
| 148 |
><H2 |
| 149 |
CLASS="SECTION" |
| 150 |
><A |
| 151 |
NAME="DBI-RESULT-GET-FIELD-LENGTH-IDX" |
| 152 |
>7.7.2. dbi_result_get_field_length_idx</A |
| 153 |
></H2 |
| 154 |
><DIV |
| 155 |
CLASS="FUNCSYNOPSIS" |
| 156 |
><P |
| 157 |
></P |
| 158 |
><A |
| 159 |
NAME="AEN2491" |
| 160 |
></A |
| 161 |
><P |
| 162 |
><CODE |
| 163 |
><CODE |
| 164 |
CLASS="FUNCDEF" |
| 165 |
>size_t <B |
| 166 |
CLASS="FSFUNC" |
| 167 |
>dbi_result_get_field_length_idx</B |
| 168 |
></CODE |
| 169 |
>(dbi_result <VAR |
| 170 |
CLASS="PDPARAM" |
| 171 |
>Result</VAR |
| 172 |
>, unsigned int <VAR |
| 173 |
CLASS="PDPARAM" |
| 174 |
>idx</VAR |
| 175 |
>);</CODE |
| 176 |
></P |
| 177 |
><P |
| 178 |
></P |
| 179 |
></DIV |
| 180 |
><P |
| 181 |
>Returns the length of the value stored in the specified field which contains a string or a binary string.</P |
| 182 |
><P |
| 183 |
></P |
| 184 |
><DIV |
| 185 |
CLASS="VARIABLELIST" |
| 186 |
><DL |
| 187 |
><DT |
| 188 |
>Arguments</DT |
| 189 |
><DD |
| 190 |
><P |
| 191 |
><TT |
| 192 |
CLASS="LITERAL" |
| 193 |
>Result</TT |
| 194 |
>: The target query result.</P |
| 195 |
><P |
| 196 |
><TT |
| 197 |
CLASS="LITERAL" |
| 198 |
>idx</TT |
| 199 |
>: The index of the target field (starting at 1).</P |
| 200 |
></DD |
| 201 |
><DT |
| 202 |
>Returns</DT |
| 203 |
><DD |
| 204 |
><P |
| 205 |
>The length in bytes of the target field data, excluding the terminating zero byte, or DBI_LENGTH_ERROR in case of an error. The return value is 0 for field types other than string or binary string. In case of an error the <A |
| 206 |
HREF="errornumbers.html" |
| 207 |
>error number</A |
| 208 |
> is one of DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, or DBI_ERROR_BADIDX.</P |
| 209 |
></DD |
| 210 |
></DL |
| 211 |
></DIV |
| 212 |
></DIV |
| 213 |
><DIV |
| 214 |
CLASS="SECTION" |
| 215 |
><H2 |
| 216 |
CLASS="SECTION" |
| 217 |
><A |
| 218 |
NAME="DBI-RESULT-GET-FIELD-SIZE" |
| 219 |
>7.7.3. dbi_result_get_field_size</A |
| 220 |
></H2 |
| 221 |
><DIV |
| 222 |
CLASS="FUNCSYNOPSIS" |
| 223 |
><P |
| 224 |
></P |
| 225 |
><A |
| 226 |
NAME="AEN2515" |
| 227 |
></A |
| 228 |
><P |
| 229 |
><CODE |
| 230 |
><CODE |
| 231 |
CLASS="FUNCDEF" |
| 232 |
>size_t <B |
| 233 |
CLASS="FSFUNC" |
| 234 |
>dbi_result_get_field_size</B |
| 235 |
></CODE |
| 236 |
>(dbi_result <VAR |
| 237 |
CLASS="PDPARAM" |
| 238 |
>Result</VAR |
| 239 |
>, const char *<VAR |
| 240 |
CLASS="PDPARAM" |
| 241 |
>fieldname</VAR |
| 242 |
>);</CODE |
| 243 |
></P |
| 244 |
><P |
| 245 |
></P |
| 246 |
></DIV |
| 247 |
><P |
| 248 |
>Returns the size in bytes of the value stored in the specified field.</P |
| 249 |
><DIV |
| 250 |
CLASS="NOTE" |
| 251 |
><BLOCKQUOTE |
| 252 |
CLASS="NOTE" |
| 253 |
><P |
| 254 |
><B |
| 255 |
>Note: </B |
| 256 |
>This function is deprecated. Use <A |
| 257 |
HREF="reference-field-meta.html#DBI-RESULT-GET-FIELD-LENGTH" |
| 258 |
>dbi_result_get_field_length</A |
| 259 |
> instead.</P |
| 260 |
></BLOCKQUOTE |
| 261 |
></DIV |
| 262 |
></DIV |
| 263 |
><DIV |
| 264 |
CLASS="SECTION" |
| 265 |
><H2 |
| 266 |
CLASS="SECTION" |
| 267 |
><A |
| 268 |
NAME="DBI-RESULT-GET-FIELD-SIZE-IDX" |
| 269 |
>7.7.4. dbi_result_get_field_size_idx</A |
| 270 |
></H2 |
| 271 |
><DIV |
| 272 |
CLASS="FUNCSYNOPSIS" |
| 273 |
><P |
| 274 |
></P |
| 275 |
><A |
| 276 |
NAME="AEN2529" |
| 277 |
></A |
| 278 |
><P |
| 279 |
><CODE |
| 280 |
><CODE |
| 281 |
CLASS="FUNCDEF" |
| 282 |
>size_t <B |
| 283 |
CLASS="FSFUNC" |
| 284 |
>dbi_result_get_field_size_idx</B |
| 285 |
></CODE |
| 286 |
>(dbi_result <VAR |
| 287 |
CLASS="PDPARAM" |
| 288 |
>Result</VAR |
| 289 |
>, unsigned long <VAR |
| 290 |
CLASS="PDPARAM" |
| 291 |
>idx</VAR |
| 292 |
>);</CODE |
| 293 |
></P |
| 294 |
><P |
| 295 |
></P |
| 296 |
></DIV |
| 297 |
><P |
| 298 |
>Returns the size in bytes of the value stored in the specified field.</P |
| 299 |
><DIV |
| 300 |
CLASS="NOTE" |
| 301 |
><BLOCKQUOTE |
| 302 |
CLASS="NOTE" |
| 303 |
><P |
| 304 |
><B |
| 305 |
>Note: </B |
| 306 |
>This function is deprecated. Use <A |
| 307 |
HREF="reference-field-meta.html#DBI-RESULT-GET-FIELD-LENGTH-IDX" |
| 308 |
>dbi_result_get_field_length_idx</A |
| 309 |
> instead.</P |
| 310 |
></BLOCKQUOTE |
| 311 |
></DIV |
| 312 |
></DIV |
| 313 |
><DIV |
| 314 |
CLASS="SECTION" |
| 315 |
><H2 |
| 316 |
CLASS="SECTION" |
| 317 |
><A |
| 318 |
NAME="DBI-RESULT-GET-FIELD-IDX" |
| 319 |
>7.7.5. dbi_result_get_field_idx</A |
| 320 |
></H2 |
| 321 |
><DIV |
| 322 |
CLASS="FUNCSYNOPSIS" |
| 323 |
><P |
| 324 |
></P |
| 325 |
><A |
| 326 |
NAME="AEN2543" |
| 327 |
></A |
| 328 |
><P |
| 329 |
><CODE |
| 330 |
><CODE |
| 331 |
CLASS="FUNCDEF" |
| 332 |
>unsigned int <B |
| 333 |
CLASS="FSFUNC" |
| 334 |
>dbi_result_get_field_idx</B |
| 335 |
></CODE |
| 336 |
>(dbi_result <VAR |
| 337 |
CLASS="PDPARAM" |
| 338 |
>Result</VAR |
| 339 |
>, const char *<VAR |
| 340 |
CLASS="PDPARAM" |
| 341 |
>fieldname</VAR |
| 342 |
>);</CODE |
| 343 |
></P |
| 344 |
><P |
| 345 |
></P |
| 346 |
></DIV |
| 347 |
><P |
| 348 |
>Given a field's name, return that field's numeric index.</P |
| 349 |
><P |
| 350 |
></P |
| 351 |
><DIV |
| 352 |
CLASS="VARIABLELIST" |
| 353 |
><DL |
| 354 |
><DT |
| 355 |
>Arguments</DT |
| 356 |
><DD |
| 357 |
><P |
| 358 |
><TT |
| 359 |
CLASS="LITERAL" |
| 360 |
>Result</TT |
| 361 |
>: The target query result.</P |
| 362 |
><P |
| 363 |
><TT |
| 364 |
CLASS="LITERAL" |
| 365 |
>fieldname</TT |
| 366 |
>: The name of the target field.</P |
| 367 |
></DD |
| 368 |
><DT |
| 369 |
>Returns</DT |
| 370 |
><DD |
| 371 |
><P |
| 372 |
>The index (starting at 1) of the target field, or 0 in case of an error. In that case, the <A |
| 373 |
HREF="errornumbers.html" |
| 374 |
>error number</A |
| 375 |
> is DBI_ERROR_BADPTR.</P |
| 376 |
></DD |
| 377 |
></DL |
| 378 |
></DIV |
| 379 |
></DIV |
| 380 |
><DIV |
| 381 |
CLASS="SECTION" |
| 382 |
><H2 |
| 383 |
CLASS="SECTION" |
| 384 |
><A |
| 385 |
NAME="DBI-RESULT-GET-FIELD-NAME" |
| 386 |
>7.7.6. dbi_result_get_field_name</A |
| 387 |
></H2 |
| 388 |
><DIV |
| 389 |
CLASS="FUNCSYNOPSIS" |
| 390 |
><P |
| 391 |
></P |
| 392 |
><A |
| 393 |
NAME="AEN2567" |
| 394 |
></A |
| 395 |
><P |
| 396 |
><CODE |
| 397 |
><CODE |
| 398 |
CLASS="FUNCDEF" |
| 399 |
>const char *<B |
| 400 |
CLASS="FSFUNC" |
| 401 |
>dbi_result_get_field_name</B |
| 402 |
></CODE |
| 403 |
>(dbi_result <VAR |
| 404 |
CLASS="PDPARAM" |
| 405 |
>Result</VAR |
| 406 |
>, unsigned int <VAR |
| 407 |
CLASS="PDPARAM" |
| 408 |
>idx</VAR |
| 409 |
>);</CODE |
| 410 |
></P |
| 411 |
><P |
| 412 |
></P |
| 413 |
></DIV |
| 414 |
><P |
| 415 |
>Given a field's numeric index, return that field's name.</P |
| 416 |
><P |
| 417 |
></P |
| 418 |
><DIV |
| 419 |
CLASS="VARIABLELIST" |
| 420 |
><DL |
| 421 |
><DT |
| 422 |
>Arguments</DT |
| 423 |
><DD |
| 424 |
><P |
| 425 |
><TT |
| 426 |
CLASS="LITERAL" |
| 427 |
>Result</TT |
| 428 |
>: The target query result.</P |
| 429 |
><P |
| 430 |
><TT |
| 431 |
CLASS="LITERAL" |
| 432 |
>idx</TT |
| 433 |
>: The index of the target field (starting at 1).</P |
| 434 |
></DD |
| 435 |
><DT |
| 436 |
>Returns</DT |
| 437 |
><DD |
| 438 |
><P |
| 439 |
>The target field's name, or NULL in case of an error. In that case the <A |
| 440 |
HREF="errornumbers.html" |
| 441 |
>error number</A |
| 442 |
> is one of DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, or DBI_ERROR_BADIDX.</P |
| 443 |
></DD |
| 444 |
></DL |
| 445 |
></DIV |
| 446 |
></DIV |
| 447 |
><DIV |
| 448 |
CLASS="SECTION" |
| 449 |
><H2 |
| 450 |
CLASS="SECTION" |
| 451 |
><A |
| 452 |
NAME="DBI-RESULT-GET-NUMFIELDS" |
| 453 |
>7.7.7. dbi_result_get_numfields</A |
| 454 |
></H2 |
| 455 |
><DIV |
| 456 |
CLASS="FUNCSYNOPSIS" |
| 457 |
><P |
| 458 |
></P |
| 459 |
><A |
| 460 |
NAME="AEN2591" |
| 461 |
></A |
| 462 |
><P |
| 463 |
><CODE |
| 464 |
><CODE |
| 465 |
CLASS="FUNCDEF" |
| 466 |
>unsigned int <B |
| 467 |
CLASS="FSFUNC" |
| 468 |
>dbi_result_get_numfields</B |
| 469 |
></CODE |
| 470 |
>(dbi_result <VAR |
| 471 |
CLASS="PDPARAM" |
| 472 |
>Result</VAR |
| 473 |
>);</CODE |
| 474 |
></P |
| 475 |
><P |
| 476 |
></P |
| 477 |
></DIV |
| 478 |
><P |
| 479 |
>Returns the number of fields in the query result.</P |
| 480 |
><P |
| 481 |
></P |
| 482 |
><DIV |
| 483 |
CLASS="VARIABLELIST" |
| 484 |
><DL |
| 485 |
><DT |
| 486 |
>Arguments</DT |
| 487 |
><DD |
| 488 |
><P |
| 489 |
><TT |
| 490 |
CLASS="LITERAL" |
| 491 |
>Result</TT |
| 492 |
>: The target query result.</P |
| 493 |
></DD |
| 494 |
><DT |
| 495 |
>Returns</DT |
| 496 |
><DD |
| 497 |
><P |
| 498 |
>The number of fields in the query result, or DBI_FIELD_ERROR in case of an error.</P |
| 499 |
></DD |
| 500 |
></DL |
| 501 |
></DIV |
| 502 |
></DIV |
| 503 |
><DIV |
| 504 |
CLASS="SECTION" |
| 505 |
><H2 |
| 506 |
CLASS="SECTION" |
| 507 |
><A |
| 508 |
NAME="DBI-RESULT-GET-FIELD-TYPE" |
| 509 |
>7.7.8. dbi_result_get_field_type</A |
| 510 |
></H2 |
| 511 |
><DIV |
| 512 |
CLASS="FUNCSYNOPSIS" |
| 513 |
><P |
| 514 |
></P |
| 515 |
><A |
| 516 |
NAME="AEN2610" |
| 517 |
></A |
| 518 |
><P |
| 519 |
><CODE |
| 520 |
><CODE |
| 521 |
CLASS="FUNCDEF" |
| 522 |
>unsigned short <B |
| 523 |
CLASS="FSFUNC" |
| 524 |
>dbi_result_get_field_type</B |
| 525 |
></CODE |
| 526 |
>(dbi_result <VAR |
| 527 |
CLASS="PDPARAM" |
| 528 |
>Result</VAR |
| 529 |
>, const char *<VAR |
| 530 |
CLASS="PDPARAM" |
| 531 |
>fieldname</VAR |
| 532 |
>);</CODE |
| 533 |
></P |
| 534 |
><P |
| 535 |
></P |
| 536 |
></DIV |
| 537 |
><P |
| 538 |
>Returns the target field's data type. The constants returned by this function are defined in dbi.h with the prefix "DBI_TYPE_".</P |
| 539 |
><P |
| 540 |
></P |
| 541 |
><DIV |
| 542 |
CLASS="VARIABLELIST" |
| 543 |
><DL |
| 544 |
><DT |
| 545 |
>Arguments</DT |
| 546 |
><DD |
| 547 |
><P |
| 548 |
><TT |
| 549 |
CLASS="LITERAL" |
| 550 |
>Result</TT |
| 551 |
>: The target query result.</P |
| 552 |
><P |
| 553 |
><TT |
| 554 |
CLASS="LITERAL" |
| 555 |
>fieldname</TT |
| 556 |
>: The target field's name.</P |
| 557 |
></DD |
| 558 |
><DT |
| 559 |
>Returns</DT |
| 560 |
><DD |
| 561 |
><P |
| 562 |
>The target field's data type, or DBI_TYPE_ERROR in case of an error. In the latter case the <A |
| 563 |
HREF="errornumbers.html" |
| 564 |
>error number</A |
| 565 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 566 |
></DD |
| 567 |
></DL |
| 568 |
></DIV |
| 569 |
></DIV |
| 570 |
><DIV |
| 571 |
CLASS="SECTION" |
| 572 |
><H2 |
| 573 |
CLASS="SECTION" |
| 574 |
><A |
| 575 |
NAME="DBI-RESULT-GET-FIELD-TYPE-IDX" |
| 576 |
>7.7.9. dbi_result_get_field_type_idx</A |
| 577 |
></H2 |
| 578 |
><DIV |
| 579 |
CLASS="FUNCSYNOPSIS" |
| 580 |
><P |
| 581 |
></P |
| 582 |
><A |
| 583 |
NAME="AEN2634" |
| 584 |
></A |
| 585 |
><P |
| 586 |
><CODE |
| 587 |
><CODE |
| 588 |
CLASS="FUNCDEF" |
| 589 |
>unsigned short <B |
| 590 |
CLASS="FSFUNC" |
| 591 |
>dbi_result_get_field_type_idx</B |
| 592 |
></CODE |
| 593 |
>(dbi_result <VAR |
| 594 |
CLASS="PDPARAM" |
| 595 |
>Result</VAR |
| 596 |
>, unsigned int <VAR |
| 597 |
CLASS="PDPARAM" |
| 598 |
>idx</VAR |
| 599 |
>);</CODE |
| 600 |
></P |
| 601 |
><P |
| 602 |
></P |
| 603 |
></DIV |
| 604 |
><P |
| 605 |
>Returns the target field's data type. The constants returned by this function are defined in dbi.h with the prefix "DBI_TYPE_".</P |
| 606 |
><P |
| 607 |
></P |
| 608 |
><DIV |
| 609 |
CLASS="VARIABLELIST" |
| 610 |
><DL |
| 611 |
><DT |
| 612 |
>Arguments</DT |
| 613 |
><DD |
| 614 |
><P |
| 615 |
><TT |
| 616 |
CLASS="LITERAL" |
| 617 |
>Result</TT |
| 618 |
>: The target query result.</P |
| 619 |
><P |
| 620 |
><TT |
| 621 |
CLASS="LITERAL" |
| 622 |
>idx</TT |
| 623 |
>: The index of the target field (starting at 1).</P |
| 624 |
></DD |
| 625 |
><DT |
| 626 |
>Returns</DT |
| 627 |
><DD |
| 628 |
><P |
| 629 |
>The target field's data type, or DBI_TYPE_ERROR in case of an error. In the latter case the <A |
| 630 |
HREF="errornumbers.html" |
| 631 |
>error number</A |
| 632 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 633 |
></DD |
| 634 |
></DL |
| 635 |
></DIV |
| 636 |
></DIV |
| 637 |
><DIV |
| 638 |
CLASS="SECTION" |
| 639 |
><H2 |
| 640 |
CLASS="SECTION" |
| 641 |
><A |
| 642 |
NAME="DBI-RESULT-GET-FIELD-ATTRIB" |
| 643 |
>7.7.10. dbi_result_get_field_attrib</A |
| 644 |
></H2 |
| 645 |
><DIV |
| 646 |
CLASS="FUNCSYNOPSIS" |
| 647 |
><P |
| 648 |
></P |
| 649 |
><A |
| 650 |
NAME="AEN2658" |
| 651 |
></A |
| 652 |
><P |
| 653 |
><CODE |
| 654 |
><CODE |
| 655 |
CLASS="FUNCDEF" |
| 656 |
>unsigned int <B |
| 657 |
CLASS="FSFUNC" |
| 658 |
>dbi_result_get_field_attrib</B |
| 659 |
></CODE |
| 660 |
>(dbi_result <VAR |
| 661 |
CLASS="PDPARAM" |
| 662 |
>Result</VAR |
| 663 |
>, const char *<VAR |
| 664 |
CLASS="PDPARAM" |
| 665 |
>fieldname</VAR |
| 666 |
>, unsigned int <VAR |
| 667 |
CLASS="PDPARAM" |
| 668 |
>attribmin</VAR |
| 669 |
>, unsigned int <VAR |
| 670 |
CLASS="PDPARAM" |
| 671 |
>attribmax</VAR |
| 672 |
>);</CODE |
| 673 |
></P |
| 674 |
><P |
| 675 |
></P |
| 676 |
></DIV |
| 677 |
><P |
| 678 |
>Returns the target field's data type attributes in the specified range. The constants returned by this function are defined in <TT |
| 679 |
CLASS="FILENAME" |
| 680 |
>include/dbi/dbi.h</TT |
| 681 |
> with the prefix "DBI_", followed by the name of the field's datatype.</P |
| 682 |
><P |
| 683 |
></P |
| 684 |
><DIV |
| 685 |
CLASS="VARIABLELIST" |
| 686 |
><DL |
| 687 |
><DT |
| 688 |
>Arguments</DT |
| 689 |
><DD |
| 690 |
><P |
| 691 |
><TT |
| 692 |
CLASS="LITERAL" |
| 693 |
>Result</TT |
| 694 |
>: The target query result.</P |
| 695 |
><P |
| 696 |
><TT |
| 697 |
CLASS="LITERAL" |
| 698 |
>fieldname</TT |
| 699 |
>: The target field's name.</P |
| 700 |
><P |
| 701 |
><TT |
| 702 |
CLASS="LITERAL" |
| 703 |
>attribmin</TT |
| 704 |
>: The first attribute value in the range of attributes to extract.</P |
| 705 |
><P |
| 706 |
><TT |
| 707 |
CLASS="LITERAL" |
| 708 |
>attribmax</TT |
| 709 |
>: The last attribute value in the range of attributes to extract. This may be the same as attribmin if you are only trying to extract a single attribute value.</P |
| 710 |
></DD |
| 711 |
><DT |
| 712 |
>Returns</DT |
| 713 |
><DD |
| 714 |
><P |
| 715 |
>The target field's requested attribute range, or DBI_ATTRIBUTE_ERROR in case of an error. In the latter case the <A |
| 716 |
HREF="errornumbers.html" |
| 717 |
>error number</A |
| 718 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 719 |
></DD |
| 720 |
></DL |
| 721 |
></DIV |
| 722 |
></DIV |
| 723 |
><DIV |
| 724 |
CLASS="SECTION" |
| 725 |
><H2 |
| 726 |
CLASS="SECTION" |
| 727 |
><A |
| 728 |
NAME="DBI-RESULT-GET-FIELD-ATTRIB-IDX" |
| 729 |
>7.7.11. dbi_result_get_field_attrib_idx</A |
| 730 |
></H2 |
| 731 |
><DIV |
| 732 |
CLASS="FUNCSYNOPSIS" |
| 733 |
><P |
| 734 |
></P |
| 735 |
><A |
| 736 |
NAME="AEN2691" |
| 737 |
></A |
| 738 |
><P |
| 739 |
><CODE |
| 740 |
><CODE |
| 741 |
CLASS="FUNCDEF" |
| 742 |
>unsigned int <B |
| 743 |
CLASS="FSFUNC" |
| 744 |
>dbi_result_get_field_attrib_idx</B |
| 745 |
></CODE |
| 746 |
>(dbi_result <VAR |
| 747 |
CLASS="PDPARAM" |
| 748 |
>Result</VAR |
| 749 |
>, unsigned int <VAR |
| 750 |
CLASS="PDPARAM" |
| 751 |
>idx</VAR |
| 752 |
>, unsigned int <VAR |
| 753 |
CLASS="PDPARAM" |
| 754 |
>attribmin</VAR |
| 755 |
>, unsigned int <VAR |
| 756 |
CLASS="PDPARAM" |
| 757 |
>attribmax</VAR |
| 758 |
>);</CODE |
| 759 |
></P |
| 760 |
><P |
| 761 |
></P |
| 762 |
></DIV |
| 763 |
><P |
| 764 |
>Returns the target field's data type attributes in the specified range. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.</P |
| 765 |
><P |
| 766 |
></P |
| 767 |
><DIV |
| 768 |
CLASS="VARIABLELIST" |
| 769 |
><DL |
| 770 |
><DT |
| 771 |
>Arguments</DT |
| 772 |
><DD |
| 773 |
><P |
| 774 |
><TT |
| 775 |
CLASS="LITERAL" |
| 776 |
>Result</TT |
| 777 |
>: The target query result.</P |
| 778 |
><P |
| 779 |
><TT |
| 780 |
CLASS="LITERAL" |
| 781 |
>idx</TT |
| 782 |
>: The index of the target field (starting at 1).</P |
| 783 |
><P |
| 784 |
><TT |
| 785 |
CLASS="LITERAL" |
| 786 |
>attribmin</TT |
| 787 |
>: The first attribute value in the range of attributes to extract.</P |
| 788 |
><P |
| 789 |
><TT |
| 790 |
CLASS="LITERAL" |
| 791 |
>attribmax</TT |
| 792 |
>: The last attribute value in the range of attributes to extract. This may be the same as attribmin if you are only trying to extract a single attribute value.</P |
| 793 |
></DD |
| 794 |
><DT |
| 795 |
>Returns</DT |
| 796 |
><DD |
| 797 |
><P |
| 798 |
>The target field's requested attribute range, or DBI_ATTRIBUTE_ERROR in case of an error. In the latter case the <A |
| 799 |
HREF="errornumbers.html" |
| 800 |
>error number</A |
| 801 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 802 |
></DD |
| 803 |
></DL |
| 804 |
></DIV |
| 805 |
></DIV |
| 806 |
><DIV |
| 807 |
CLASS="SECTION" |
| 808 |
><H2 |
| 809 |
CLASS="SECTION" |
| 810 |
><A |
| 811 |
NAME="DBI-RESULT-GET-FIELD-ATTRIBS" |
| 812 |
>7.7.12. dbi_result_get_field_attribs</A |
| 813 |
></H2 |
| 814 |
><DIV |
| 815 |
CLASS="FUNCSYNOPSIS" |
| 816 |
><P |
| 817 |
></P |
| 818 |
><A |
| 819 |
NAME="AEN2723" |
| 820 |
></A |
| 821 |
><P |
| 822 |
><CODE |
| 823 |
><CODE |
| 824 |
CLASS="FUNCDEF" |
| 825 |
>unsigned int <B |
| 826 |
CLASS="FSFUNC" |
| 827 |
>dbi_result_get_field_attribs</B |
| 828 |
></CODE |
| 829 |
>(dbi_result <VAR |
| 830 |
CLASS="PDPARAM" |
| 831 |
>Result</VAR |
| 832 |
>, const char *<VAR |
| 833 |
CLASS="PDPARAM" |
| 834 |
>fieldname</VAR |
| 835 |
>);</CODE |
| 836 |
></P |
| 837 |
><P |
| 838 |
></P |
| 839 |
></DIV |
| 840 |
><P |
| 841 |
>Returns the target field's data type attributes. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.</P |
| 842 |
><P |
| 843 |
></P |
| 844 |
><DIV |
| 845 |
CLASS="VARIABLELIST" |
| 846 |
><DL |
| 847 |
><DT |
| 848 |
>Arguments</DT |
| 849 |
><DD |
| 850 |
><P |
| 851 |
><TT |
| 852 |
CLASS="LITERAL" |
| 853 |
>Result</TT |
| 854 |
>: The target query result.</P |
| 855 |
><P |
| 856 |
><TT |
| 857 |
CLASS="LITERAL" |
| 858 |
>fieldname</TT |
| 859 |
>: The target field's name.</P |
| 860 |
></DD |
| 861 |
><DT |
| 862 |
>Returns</DT |
| 863 |
><DD |
| 864 |
><P |
| 865 |
>The target field's attributes, or DBI_ATTRIBUTE_ERROR in case of an error. In case of an error the <A |
| 866 |
HREF="errornumbers.html" |
| 867 |
>error number</A |
| 868 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 869 |
></DD |
| 870 |
></DL |
| 871 |
></DIV |
| 872 |
></DIV |
| 873 |
><DIV |
| 874 |
CLASS="SECTION" |
| 875 |
><H2 |
| 876 |
CLASS="SECTION" |
| 877 |
><A |
| 878 |
NAME="DBI-RESULT-GET-FIELD-ATTRIBS-IDX" |
| 879 |
>7.7.13. dbi_result_get_field_attribs_idx</A |
| 880 |
></H2 |
| 881 |
><DIV |
| 882 |
CLASS="FUNCSYNOPSIS" |
| 883 |
><P |
| 884 |
></P |
| 885 |
><A |
| 886 |
NAME="AEN2747" |
| 887 |
></A |
| 888 |
><P |
| 889 |
><CODE |
| 890 |
><CODE |
| 891 |
CLASS="FUNCDEF" |
| 892 |
>unsigned int <B |
| 893 |
CLASS="FSFUNC" |
| 894 |
>dbi_result_get_field_attribs_idx</B |
| 895 |
></CODE |
| 896 |
>(dbi_result <VAR |
| 897 |
CLASS="PDPARAM" |
| 898 |
>Result</VAR |
| 899 |
>, unsigned int <VAR |
| 900 |
CLASS="PDPARAM" |
| 901 |
>fieldidx</VAR |
| 902 |
>);</CODE |
| 903 |
></P |
| 904 |
><P |
| 905 |
></P |
| 906 |
></DIV |
| 907 |
><P |
| 908 |
>Returns the target field's data type attributes. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.</P |
| 909 |
><P |
| 910 |
></P |
| 911 |
><DIV |
| 912 |
CLASS="VARIABLELIST" |
| 913 |
><DL |
| 914 |
><DT |
| 915 |
>Arguments</DT |
| 916 |
><DD |
| 917 |
><P |
| 918 |
><TT |
| 919 |
CLASS="LITERAL" |
| 920 |
>Result</TT |
| 921 |
>: The target query result.</P |
| 922 |
><P |
| 923 |
><TT |
| 924 |
CLASS="LITERAL" |
| 925 |
>fieldidx</TT |
| 926 |
>: The index of the target field (starting at 1).</P |
| 927 |
></DD |
| 928 |
><DT |
| 929 |
>Returns</DT |
| 930 |
><DD |
| 931 |
><P |
| 932 |
>The target field's attributes, or DBI_ATTRIBUTE_ERROR in case of an error. In that case the <A |
| 933 |
HREF="errornumbers.html" |
| 934 |
>error number</A |
| 935 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 936 |
></DD |
| 937 |
></DL |
| 938 |
></DIV |
| 939 |
></DIV |
| 940 |
><DIV |
| 941 |
CLASS="SECTION" |
| 942 |
><H2 |
| 943 |
CLASS="SECTION" |
| 944 |
><A |
| 945 |
NAME="DBI-RESULT-FIELD-IS-NULL" |
| 946 |
>7.7.14. dbi_result_field_is_null</A |
| 947 |
></H2 |
| 948 |
><DIV |
| 949 |
CLASS="FUNCSYNOPSIS" |
| 950 |
><P |
| 951 |
></P |
| 952 |
><A |
| 953 |
NAME="AEN2771" |
| 954 |
></A |
| 955 |
><P |
| 956 |
><CODE |
| 957 |
><CODE |
| 958 |
CLASS="FUNCDEF" |
| 959 |
>int <B |
| 960 |
CLASS="FSFUNC" |
| 961 |
>dbi_result_field_is_null</B |
| 962 |
></CODE |
| 963 |
>(dbi_result <VAR |
| 964 |
CLASS="PDPARAM" |
| 965 |
>Result</VAR |
| 966 |
>, const char *<VAR |
| 967 |
CLASS="PDPARAM" |
| 968 |
>fieldname</VAR |
| 969 |
>);</CODE |
| 970 |
></P |
| 971 |
><P |
| 972 |
></P |
| 973 |
></DIV |
| 974 |
><P |
| 975 |
>Determines whether the indicated field contains a NULL value.</P |
| 976 |
><P |
| 977 |
></P |
| 978 |
><DIV |
| 979 |
CLASS="VARIABLELIST" |
| 980 |
><DL |
| 981 |
><DT |
| 982 |
>Arguments</DT |
| 983 |
><DD |
| 984 |
><P |
| 985 |
><TT |
| 986 |
CLASS="LITERAL" |
| 987 |
>Result</TT |
| 988 |
>: The target query result.</P |
| 989 |
><P |
| 990 |
><TT |
| 991 |
CLASS="LITERAL" |
| 992 |
>fieldname</TT |
| 993 |
>: The name of the target field.</P |
| 994 |
></DD |
| 995 |
><DT |
| 996 |
>Returns</DT |
| 997 |
><DD |
| 998 |
><P |
| 999 |
>1 if the field contains a NULL value, otherwise 0, or DBI_FIELD_FLAG_ERROR in case of an error. In the latter case the <A |
| 1000 |
HREF="errornumbers.html" |
| 1001 |
>error number</A |
| 1002 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 1003 |
></DD |
| 1004 |
></DL |
| 1005 |
></DIV |
| 1006 |
></DIV |
| 1007 |
><DIV |
| 1008 |
CLASS="SECTION" |
| 1009 |
><H2 |
| 1010 |
CLASS="SECTION" |
| 1011 |
><A |
| 1012 |
NAME="DBI-RESULT-FIELD-IS-NULL-IDX" |
| 1013 |
>7.7.15. dbi_result_field_is_null_idx</A |
| 1014 |
></H2 |
| 1015 |
><DIV |
| 1016 |
CLASS="FUNCSYNOPSIS" |
| 1017 |
><P |
| 1018 |
></P |
| 1019 |
><A |
| 1020 |
NAME="AEN2795" |
| 1021 |
></A |
| 1022 |
><P |
| 1023 |
><CODE |
| 1024 |
><CODE |
| 1025 |
CLASS="FUNCDEF" |
| 1026 |
>int <B |
| 1027 |
CLASS="FSFUNC" |
| 1028 |
>dbi_result_field_is_null_idx</B |
| 1029 |
></CODE |
| 1030 |
>(dbi_result <VAR |
| 1031 |
CLASS="PDPARAM" |
| 1032 |
>Result</VAR |
| 1033 |
>, unsigned int <VAR |
| 1034 |
CLASS="PDPARAM" |
| 1035 |
>fieldidx</VAR |
| 1036 |
>);</CODE |
| 1037 |
></P |
| 1038 |
><P |
| 1039 |
></P |
| 1040 |
></DIV |
| 1041 |
><P |
| 1042 |
>Determines whether the indicated field contains a NULL value.</P |
| 1043 |
><P |
| 1044 |
></P |
| 1045 |
><DIV |
| 1046 |
CLASS="VARIABLELIST" |
| 1047 |
><DL |
| 1048 |
><DT |
| 1049 |
>Arguments</DT |
| 1050 |
><DD |
| 1051 |
><P |
| 1052 |
><TT |
| 1053 |
CLASS="LITERAL" |
| 1054 |
>Result</TT |
| 1055 |
>: The target query result.</P |
| 1056 |
><P |
| 1057 |
><TT |
| 1058 |
CLASS="LITERAL" |
| 1059 |
>fieldidx</TT |
| 1060 |
>: The index of the target field (starting at 1).</P |
| 1061 |
></DD |
| 1062 |
><DT |
| 1063 |
>Returns</DT |
| 1064 |
><DD |
| 1065 |
><P |
| 1066 |
>1 if the field contains a NULL value, otherwise 0, or DBI_FIELD_FLAG_ERROR in case of an error. In the latter case the <A |
| 1067 |
HREF="errornumbers.html" |
| 1068 |
>error number</A |
| 1069 |
> is DBI_ERROR_BADPTR, DBI_ERROR_BADOBJECT, DBI_ERROR_BADIDX, or DBI_ERROR_BADNAME.</P |
| 1070 |
></DD |
| 1071 |
></DL |
| 1072 |
></DIV |
| 1073 |
></DIV |
| 1074 |
></DIV |
| 1075 |
><DIV |
| 1076 |
CLASS="NAVFOOTER" |
| 1077 |
><HR |
| 1078 |
ALIGN="LEFT" |
| 1079 |
WIDTH="100%"><TABLE |
| 1080 |
SUMMARY="Footer navigation table" |
| 1081 |
WIDTH="100%" |
| 1082 |
BORDER="0" |
| 1083 |
CELLPADDING="0" |
| 1084 |
CELLSPACING="0" |
| 1085 |
><TR |
| 1086 |
><TD |
| 1087 |
WIDTH="33%" |
| 1088 |
ALIGN="left" |
| 1089 |
VALIGN="top" |
| 1090 |
><A |
| 1091 |
HREF="reference-results.html" |
| 1092 |
ACCESSKEY="P" |
| 1093 |
>Prev</A |
| 1094 |
></TD |
| 1095 |
><TD |
| 1096 |
WIDTH="34%" |
| 1097 |
ALIGN="center" |
| 1098 |
VALIGN="top" |
| 1099 |
><A |
| 1100 |
HREF="index.html" |
| 1101 |
ACCESSKEY="H" |
| 1102 |
>Home</A |
| 1103 |
></TD |
| 1104 |
><TD |
| 1105 |
WIDTH="33%" |
| 1106 |
ALIGN="right" |
| 1107 |
VALIGN="top" |
| 1108 |
><A |
| 1109 |
HREF="reference-field.html" |
| 1110 |
ACCESSKEY="N" |
| 1111 |
>Next</A |
| 1112 |
></TD |
| 1113 |
></TR |
| 1114 |
><TR |
| 1115 |
><TD |
| 1116 |
WIDTH="33%" |
| 1117 |
ALIGN="left" |
| 1118 |
VALIGN="top" |
| 1119 |
>Managing Results</TD |
| 1120 |
><TD |
| 1121 |
WIDTH="34%" |
| 1122 |
ALIGN="center" |
| 1123 |
VALIGN="top" |
| 1124 |
><A |
| 1125 |
HREF="reference.html" |
| 1126 |
ACCESSKEY="U" |
| 1127 |
>Up</A |
| 1128 |
></TD |
| 1129 |
><TD |
| 1130 |
WIDTH="33%" |
| 1131 |
ALIGN="right" |
| 1132 |
VALIGN="top" |
| 1133 |
>Retrieving Field Data by Name</TD |
| 1134 |
></TR |
| 1135 |
></TABLE |
| 1136 |
></DIV |
| 1137 |
></BODY |
| 1138 |
></HTML |
| 1139 |
> |