Example usage for java.sql DataTruncation getDataSize

List of usage examples for java.sql DataTruncation getDataSize

Introduction

In this page you can find the example usage for java.sql DataTruncation getDataSize.

Prototype

public int getDataSize() 

Source Link

Document

Gets the number of bytes of data that should have been transferred.

Usage

From source file:Main.java

public static void displayError(DataTruncation dataTruncation) {
    System.out.println(dataTruncation.getDataSize() + " bytes should have been ");
    if (dataTruncation.getRead()) {
        System.out.println("Read (Error:) ");
    } else {/*from  w  ww  .j  a v a 2  s  .  c o  m*/
        System.out.println("Written (Error:) ");
    }
    System.out.println(dataTruncation.getTransferSize() + " number of bytes of data actually transferred.");
}

From source file:DemoDataTruncation.java

public static void displayError(DataTruncation dataTruncation) {
    System.out.println("Data truncation error: ");
    System.out.println(dataTruncation.getDataSize() + " bytes should have been ");
    if (dataTruncation.getRead()) {
        System.out.println("Read (Error:) ");
    } else {//w  w w . java2 s  .c  o  m
        System.out.println("Written (Error:) ");
    }
    System.out.println(dataTruncation.getTransferSize() + " number of bytes of data actually transferred.");
}

From source file:Main.java

public static void displayError(DataTruncation dataTruncation) {
    if (dataTruncation != null) {
        System.out.println("Data truncation error: ");
        System.out.println(dataTruncation.getDataSize() + " bytes should have been ");
        if (dataTruncation.getRead()) {
            System.out.println("Read (Error:) ");
        } else {//from  ww  w .  j  a v  a2s . com
            System.out.println("Written (Error:) ");
        }
        System.out.println(dataTruncation.getTransferSize() + " number of bytes of data actually transferred.");
    }
}