1. Andrew Davis
  2. PowerBuilder
  3. Thursday, 27 June 2019


I am trying to insert some data to my database and I am getting a right truncation error - so i turned of the error checking for the erros . The data has many international characters in it.

I now get a primary key exists because the data is truncated

This is what i am doing


// then selecting the database to see if it exists

select ...... where "name"=:ls_name

// i get the the result - not found on database

so it insert


// i get an error saying the record already exists 


Is there a way of checking what the database will truncate the data to and then truncate it in powerscript ?






Hi Andrew

So to be clear when you do the getitemstring you get the complete string value, but the insert is truncating this in the DB.

If that's the case it sound like the DB column size is too small. If so you should change the DW column size to match.

If that's not the case can you give details of the column in the DB as the DW properties?



It would be helpful to know which database server, which PB database driver, and PB version you are using, Andrew.
  1. John Fauss
  2. Thursday, 27 June 2019
There are no comments made yet.
  1. Thursday, 27 June 2019
  2. PowerBuilder
  3. # 1
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.