Help and Support
 

powered byLive Search

ACC2000: Char/Nchar and Varchar/Nvarchar Values Displayed Incorrectly in an Access Project

Article ID:244010
Last Review:November 25, 2002
Revision:1.0
This article was previously published under Q244010
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access project (.adp).

On This Page

SYMPTOMS

When you view the contents of a char, nchar, varchar, or nvarchar column in an Access project that contains a value with more than 256 characters, the first 256 characters of the string are repeated, regardless of the contents of the whole column value. Characters after the 256th position are not displayed at all.

Back to the top

RESOLUTION

To resolve this problem, obtain Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a).

To obtain SR-1/SR-1a, click the article number below to view the article in the Microsoft Knowledge Base:
245025 (http://support.microsoft.com/kb/245025/EN-US/) OFF2000: How to Obtain and Install Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a)
To temporarily work around this problem, use the SQL Server text or ntext data type instead of char, nchar, varchar, or nvarchar.

Back to the top

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Office 2000 SR-1/SR-1a.

Back to the top

MORE INFORMATION

Steps to Reproduce Behavior

1.In an Access project connected to SQL Server or Microsoft Data Engine (MSDE), create the following table named TestTable:

Column NameData TypeLengthAllow NullsIdentityPrimary Key
MyPkint4NoYesYes
MyCharchar1000YesNoNo
MyTexttext16YesNoNo
2.Save the table.
3.Open the newly created table in Datasheet view.
4.Press ALT+F11 to start the Visual Basic Editor.
5.Press CTRL+G to open the Immediate window.
6.Type the following line of code in the Immediate window, and then press ENTER:
?string(100,"a") & string(100,"b") & string(100,"c") & string(100,"d")
This code produces a 400-character string containing 100 a's, followed by 100 b's, followed by 100 c's, followed by 100 d's.
7.Highlight the entire 400-character string in the Immediate window to select it, and then on the Edit menu, click Copy to copy the string to the Clipboard.
8.Close the Visual Basic Editor.
9.Paste the string from the Clipboard into both the MyChar and MyText columns of the TestTable table.
10.Click in the MyText column and press SHIFT+F2. Note that the string is displayed correctly in the Zoom box.
11.Click OK to close the Zoom box.
12.Click in the MyChar column, and then press SHIFT+F2. Note that after 256 characters (the 56th letter "c"), the string is repeated. No letter d's are ever displayed.

Back to the top


APPLIES TO
Microsoft Access 2000 Standard Edition

Back to the top

Keywords: 
kbbug kbclientserver kbpending KB244010

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.