Loading ...
Sorry, an error occurred while loading the content.

121Re: [xml-dbms] Data truncation on insert not an error?

Expand Messages
  • Phil Friedman
    Jun 21, 2000
      Ron,

      Sybase Adaptive Server Anywhere has an option at the database level (it
      affects all connections to the database)

      STRING_RTRUNCATION option

      --------------------------------------------------------------------------------

      Function
      Determines whether an error is raised when an INSERT or UPDATE truncates a CHAR or VARCHAR string.

      Allowed values
      ON, OFF

      Default
      OFF

      Description
      If the truncated characters consist only of spaces, no exception is raised. The setting of ON corresponds to ANSI/ISO SQL/92 behavior. When it is set to OFF, the exception is not raised and the character string is silently truncated.

      Set the string_rtruncation option
      Both Adaptive Server Enterprise and Adaptive Server Anywhere support the string_rtruncation option, which affects error message reporting when an INSERT or UPDATE string is truncated. Ensure that each database has the option set to the same value.

      Regards, Philip Friedman -- Terralink Software Systems -- 207-772-6500 x101

      On Mon, 29 May 2000 15:53:15 -0000, "Ronald Bourret" <rpbourret@...> may have written:

      |I'm using the JDBC-ODBC bridge with the MS Access ODBC driver and MS
      |Access. When I transfer a string value from XML to the database and
      |the value is too large for the column -- for example, the value is
      |100
      |characters long and the column is Text(50) -- the value is still
      |transferred but it is truncated.
      |
      |I expected that this would be an error (and throw a DataTruncation or
      |SQLException exception) as it is in ODBC and the international
      |standard on which ODBC and JDBC are based. (JDBC is more vague,
      |saying
      |that truncation on input "should", rather than "must", raise an
      |error.)
      |
      |Does anybody know if this is simply a problem with my driver? Or can
      |people insert truncated values into other databases?
      |
      |-- Ron Bourret
      |
      |
      |------------------------------------------------------------------------
      |Best friends, most artistic, class clown Find 'em here:
      |http://click.egroups.com/1/4054/0/_/735786/_/959615690/
      |------------------------------------------------------------------------
      |
      |To Post a message, send it to: xml-dbms@...
      |
      |To Unsubscribe, send a blank message to: xml-dbms-unsubscribe@...
    • Show all 8 messages in this topic