IT. Expert System.

Android Reference

DataTruncation


java.sql

Class DataTruncation

  • All Implemented Interfaces:
    Serializable, Iterable<Throwable>


    public class DataTruncation
    extends SQLWarning
    implements Serializable
    An exception which is thrown when a JDBC driver unexpectedly truncates a data value either when reading (resulting in warning), or when writing data (resulting in an error). The SQLState error code for truncated data is 01004.
    See Also:
    Serialized Form
    • Constructor Detail

      • DataTruncation

        public DataTruncation(int index,
                      boolean parameter,
                      boolean read,
                      int dataSize,
                      int transferSize)
        Creates the DataTruncation object. The reason is set to "Data truncation", the error code is set to the SQLException default value, and the other fields are set to the values supplied as arguments.
        Parameters:
        index - the Index value of the column value or parameter that was truncated.
        parameter - true if it was a parameter value that was truncated, false otherwise.
        read - true if the truncation occurred on a read operation, false otherwise.
        dataSize - the original size of the truncated data.
        transferSize - the size of the data after truncation.
      • DataTruncation

        public DataTruncation(int index,
                      boolean parameter,
                      boolean read,
                      int dataSize,
                      int transferSize,
                      Throwable cause)
        Creates a DataTruncation. The Reason is set to "Data truncation", the error code is set to the SQLException default value and other fields are set to the values supplied on this method.
        Parameters:
        index - the Index value of the column value or parameter that was truncated
        parameter - true if it was a Parameter value that was truncated, false otherwise
        read - true if the truncation occurred on a read operation, false otherwise
        dataSize - the original size of the truncated data
        transferSize - the size of the data after truncation
        cause - the root reason for this DataTruncation
        Since:
        1.6
    • Method Detail

      • getDataSize

        public int getDataSize()
        Gets the number of bytes of data that should have been read/written.
        Returns:
        the number of bytes that should have been read or written. The value is set to -1 if the size is unknown.
      • getIndex

        public int getIndex()
        Gets the index of the column or of the parameter that was truncated.
        Returns:
        the index number of the column or of the parameter.
      • getParameter

        public boolean getParameter()
        Gets whether the value truncated was a parameter value or a column value.
        Returns:
        true if the value truncated was a parameter value, false if it was a column value.
      • getRead

        public boolean getRead()
        Gets whether the value was truncated on a read operation or a write operation
        Returns:
        true if the value was truncated on a read operation, false otherwise.
      • getTransferSize

        public int getTransferSize()
        Gets the number of bytes of data that was actually read or written.
        Returns:
        the number of bytes actually read/written. The value may be set to -1 if the size is unknown.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3644 / . Delta: 0.04582 с