Azamat Bagatov
Azamat Bagatov

Reputation: 289

Name requires more than 30 bytes in LATIN internal form?

I am trying to implement Fastload Utility with jdbc. But I keep getting the following error: Name requires more than 30 bytes in LATIN internal form

I read many articles : this error occurs during table creation. In my case this error is thrown at the executeBatch() line . Here is my code

    Connection conn = DriverManager.getConnection(url, username, password); // I am using TYPE=FASTLOAD 
    // creating table 
    String createStr = 
    "CREATE TABLE dbname.tablename( " + 
" Fname VARCHAR(506) CHARACTER SET UNICODE, " + 
" Lname VARCHAR(507) CHARACTER SET UNICODE " + 
" );"
    Statement createTable  = ... 
    createTable.execueQuery("CREATE TABLE ... ") ;

    PreparedStatement prst = ...  ; 


    while ( // loop ) { 
    prst.addBatch();
    }
    prst.executeBatch(); // Here it throws this error 
    conn.commit();

Why do I get this error when executeBatch() method fires ? What can I do ?

Upvotes: 0

Views: 2554

Answers (1)

Andrew
Andrew

Reputation: 8758

I believe FastLoad prefaces the column names with "F_", so your column names need to be 28 characters or less. From the documentation:

The destination table column names must not exceed 28 characters.

Here's a link to the documentation.

Upvotes: 2

Related Questions