home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume30 / oraperl-v2 / part05 / Long < prev    next >
Encoding:
Text File  |  1992-07-06  |  1.1 KB  |  28 lines

  1.  
  2. Prior to version 2, Oraperl could not handle tables which contained
  3. LONG or LONGRAW datatypes.
  4.  
  5. The reason for this is that the OCI odsc function, which Oraperl uses
  6. to determine the amount of buffer space to allocate for each field,
  7. does not return a meaningful response in these cases. As a result, a
  8. small buffer was allocated and the data was truncated during the fetch,
  9. which Oraperl treated as an error.
  10.  
  11. To deal with LONG datatypes, two variables have been added.
  12.  
  13.     $ora_long may be set by a program to the length of buffer to
  14.     be allocated for any LONG or LONGRAW fields encountered. It
  15.     is initialised to 80, as that is the value used by various
  16.     Oracle tools.
  17.  
  18.     $ora_trunc is a flag which indicates whether truncation of a
  19.     LONG is to be considered an error or permitted. If $ora_trunc
  20.     is zero, then truncation of a LONG field causes &ora_fetch to
  21.     fail. Otherwise, the fetch completes successfully, but $ora_errno
  22.     is still set (to 1406) to warn of the truncation.
  23.  
  24. &ora_fetch() accepts an optional second parameter which overrides the
  25. setting of $ora_trunc for that call.
  26.  
  27. Truncation of all other datatypes remains an error.
  28.