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

Hi

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

ls_name=dw_1.getitemstring(ll_loop,"name")

// 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

insert....name=:ls_name

// i get an error saying the record already exists 

So  

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

 

thanks

 

Anderw

1
Votes
Undo

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?

Thanks

David

Comment
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.