Parameters to Access Long Text fields limited to 255 characters

By: Quinn Wildman

Abstract: DAO and ODBC both impose this limit.

A TQuery that updates an Access LongText field via a Parameter or a TUpdateSQL Component that does the same will fail if number of characters in the parameter is more than 255. If the connection is done via ODBC it will result in a BDE error of "General SQL Error" and then an error from the ODBC of "String data, right truncated (null)". If the connection is done via the BDE Native driver it will result in an error of "External Exception EEFACE".

The reason the ODBC driver error occurs is because the Access ODBC driver has a limit of 255 characters for parameters.

The reason the error occurs with the Native driver is the DAO limits parameters to 255 characters and the BDE uses the Microsoft DAO client to use Access tables.

The best workaround to this problem is to use ADO with Delphi 5.

Another partial solution is to use a TQuery with requestlive=true, or a TTable.


Server Response from: ETNASC03