Plex 2E

 View Only

 Field length varchar in ODBC

Klaus Lichte's profile image
Klaus Lichte posted May 26, 2025 05:18 AM

Hello Plexperts,


we are using ODBC and receive the following message when generating a table for testing purposes with varchar field ("KL_Notiz") with more than 255 characters:

Although the message states that the maximum length for ODBC connections is limited to 255 characters,
our application also works with the field named "KL_Notiz" of type varchar with a length of 5000 characters.

Is this message perhaps outdated and no longer valid for current ODBC drivers?

Best regards
Klaus

Chi Chen's profile image
Broadcom Employee Chi Chen

This sounds like a message instead of an error. If you check the KL_Notiz in DBMS, it should be LONG VARCHAR. Some older odbc driver allows up to 255 varchar size but convert to long varchar if exceeds that size.

Klaus Lichte's profile image
Klaus Lichte

Hello Chi,

thank you for your feedback.

The field "KL_Notiz" is declaired as a varchar, length 5000 in our DBMS Sybase ASA.

There are no runtime issues processing a character field with more than 255 characters via ODBC in our application. As you wrote, the message is merely a development hint and does not result in an error at runtime.

However, the Plex grids do not support displaying more than 256 characters (see Plex help) ---

... which is not currently a problem for us.

Best regards
Klaus