Microsoft KB Archive/196711

= BUG: Extra Spaces Added to Fields When Updating MS Access Table =

Article ID: 196711

Article Last Modified on 3/7/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Data Access Components 2.5

-



This article was previously published under Q196711



SYMPTOMS
When you update a Microsoft Access table from Visual FoxPro using the Microsoft Access ODBC Driver and the string value being updated is shorter than the actual field width, extra spaces are added to the end of the string.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
  Using Microsoft Access create a database that has a table with the following structure:      Field Name      Field Type --

ID             AutoNumber Fld1           Text(10) Fld2           Text(10) Add some records to the table and then exit Microsoft Access.  Using the ODBC Manager, create an ODBC DataSource to the Microsoft Access table based on the Microsoft Access ODBC driver. In Visual FoxPro, open a database and create a Remote View to the Microsoft Access table using the data source created in the step 2. In the Visual FoxPro View Designer dialog box, choose the Fields tab and then select all of the fields. Click the Update Criteria tab, and then select ID as the key and set all the fields as updateable. Select the "Send SQL Update" option. Save and then close the view.  Open the view and add a record to it as follows: USE View1 INSERT INTO View1 VALUES(7,'aaa','aaa')  Exit Visual FoxPro and then run Microsoft Access.</li> View the table in Microsoft Access, and select either fld1 or fld2 in a record you added from Visual FoxPro.</li></ol>

RESULTS: Note that extra blank spaces are added to the string entered in Fld1 and Fld2, as in the following example:

('aaa ')

Keywords: kbbug kbdatabase kbpending KB196711

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.