1. Vladislav Cale
  2. PowerBuilder
  3. Thursday, 17 October 2019 07:34 AM UTC

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
  1. Thursday, 17 October 2019 10:55 AM UTC
  2. PowerBuilder
  3. # Permalink

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.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 18 October 2019 16:12 PM UTC
  2. PowerBuilder
  3. # 1

Excellent!

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

Comment
There are no comments made yet.
Vladislav Cale Accepted Answer Pending Moderation
  1. Friday, 18 October 2019 07:01 AM UTC
  2. PowerBuilder
  3. # 2

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.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 17 October 2019 16:03 PM UTC
  2. PowerBuilder
  3. # 3

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.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.