Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/100658

From BetaArchive Wiki

ACC1x: 255-Char String Displays Only 254 Characters with ODBC


The information in this article applies to:

  • Microsoft Access 1.1


When you attach a remote table using ODBC, data in 255-character fields in the attached table appears to be truncated after the 254th character.


A data buffer is set one character too small to display all the data in the field. Note that only the display is being truncated, the data itself is unchanged.


Create a Memo or Note field to contain data that is 255 characters long.


Microsoft has confirmed this to be a problem in Microsoft Access version 1.1. This problem no longer occurs in Microsoft Access version 2.0.

Steps to Reproduce Problem

  1. Create a table in ORACLE or Microsoft SQL Server containing the following SQL statements:

        In Oracle:      CREATE TABLE Bug (Id NUMBER(10,0),
                               Field1 CHAR(255))
                        CREATE UNIQUE INDEX BugPK ON Bug(ID)
        In SQL Server:  CREATE TABLE Bug (Id INT, Field1 CHAR(255))
                        CREATE UNIQUE INDEX BugPK ON Bug(ID) 
  2. Attach and view the table in Microsoft Access.
  3. In the ID field, enter the number 1. In Field1, enter 255 characters.
  4. Commit the record.

    Result: Only 254 characters are displayed in Field1.

An easy way to test this procedure is to create a macro called AutoKey, as follows:

   MacroName     Action
   ^A            SendKeys

   AutoKey Actions

      Keystrokes: {TAB}{a 255}
      Wait: No 

If you reopen the table, move to the 255-character column, and press CTRL+A, the SendKeys action automatically enters the letter "a" 255 times.

ORACLE is manufactured by Oracle Corporation, a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability.

Additional query words: ODBC Oracle truncate

Keywords : kbusage
Issue type : kbbug
Technology :

Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.