1. Vladislav Cale
  2. PowerBuilder
  3. Thursday, 17 October 2019

PB 2019  Build 2082   using PostgreSQL 10.8 

We have a problem reading values from column that is text data type with a length over 32768 characters. If the length of text is bigger we get only first 32768 characters

We configure ODBC for database connection like in the figure below. We tested the behavior of the ODBC driver when we changed the value of MaxLongVarChar propertie. If we fill it with the value less then 32768, select from text column give us that number of characters, but if we fill with the bigger value we still get only first 32768 characters.

Accepted Answer
Michael Kramer Accepted Answer Pending Moderation
0
Votes
Undo

I personally haven't used PB towards PostgreSQL since approx. 2012.

Your issue may be related to datatype matching between the ODBC driver and PowerBuilder. My stomach feeling is that you have to treat LongVarChar datatype as a BLOB style column. Hence, SELECTBLOB/UPDATEBLOB. That also means different handling in DataWindow that regular string.

Anyone with experience using recent PB  versions with PostgreSQL where LongVarChar is the data type.

HTH /Michael

Comment
There are no comments made yet.
  1. Thursday, 17 October 2019
  2. PowerBuilder
  3. # Permalink
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Excellent!

Yes, always a great day when you learn something new (IMHO). All the best ... Chris

Comment
There are no comments made yet.
  1. Friday, 18 October 2019
  2. PowerBuilder
  3. # 1
Vladislav Cale Accepted Answer Pending Moderation
0
Votes
Undo

Thanks Chris,

selectblob works fine. We thought that this command is used only for blob data types and not for text or long varchars.

Comment
There are no comments made yet.
  1. Friday, 18 October 2019
  2. PowerBuilder
  3. # 2
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Vladislav;

      PB's DataWindow can only handle varchar columns up to 32768 characters. That is the DWO limitation at the moment. In order to retrieve more character data than that per column, you need to use the SelectBlob command.

HTH

Regards ... Chris

Comment
There are no comments made yet.
  1. Thursday, 17 October 2019
  2. PowerBuilder
  3. # 3
  • Page :
  • 1


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