ACC97: SQL Memo Fields Truncated to 255 in Update Query
ID: Q170218
|
The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you run an update query from Microsoft Access to copy the contents of
one SQL Server Memo field into another SQL Server Memo field, the data in
the new field will be truncated at 255 characters.
CAUSE
This behavior will occur when you add criteria to one of the SQL Server
fields, that field is part of an index, and you are using any of the
following 32-bit ODBC drivers:
Driver Version Source
------------ --------- ---------------------------------------------
SQLSRV32.DLL 2.50.0126 Microsoft Access 7.0
2.65.0201 ODBC Desktop Driver Pack 3.0 (Q139487)
2.65.0213 Microsoft Access 97 (Q159674)
2.65.0240 SQL Server 6.5
To obtain the latest drivers, install the Microsoft Data Access Components (MDAC) 2.0 from the following Microsoft Web site:
http://www.microsoft.com/data/
RESOLUTION
Remove the criteria you have set on the indexed field.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 97.
MORE INFORMATION
Steps to Reproduce Problem
- Create a table called TEST in MS SQL Server 6.5 with the following
structure:
Key ColumnName Datatype Size Nulls Default
---- ----------- -------- ---- ----- -------
Y EmployeeID int 4
LastName char 25
Notes text 16 Y
Notes2 text 16 Y
- Open the sample database Northwind.mdb.
- Create a link to the Test table you created in step 1.
- Create an append query that appends the EmployeeID and Notes field
from the Employees table to the EmployeeID and Notes field in the
Test table. This will provide sample data for the SQL table.
- Create an update query based on the dbo_test table in Microsoft Access
by typing the following syntax in the SQL View window:
UPDATE dbo_Test SET dbo_Test.Notes2 = [dbo_test]![notes]
WHERE (((dbo_Test.EmployeeID)=2));
- Run the query.
- Open the dbo_Test table to view the results.
Note that the query updates the Notes2 Memo field with the data from the
Notes Memo field. However, the data in the Notes2 field is truncated
at 255 characters.
Additional query words:
prb pra
Keywords : kbinterop kbdta OdbcSqlms
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug