You cannot insert more than 250 KB of data in a SQL Server 7.0 or SQL Server 2000 Image field from Visual FoxPro (245714)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q245714 SYMPTOMS
In Microsoft Visual FoxPro, if you use a remote view to insert or replace more than approximately 250 KB of data in an image field in a Microsoft SQL Server 7.0 or SQL Server 2000 table, causes the TableUpdate function to fail. You receive the following error message if you try to browse the table by double-clicking it in the remote view:
Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid locator de-referenced.
RESOLUTION
Here are two ways to work around this problem:
- Use a TABLEUPDATE(.T.) after the first replace statement. For example use the following code:
APPEND BLANK
REPLACE IID WITH RECCOUNT()+1, VERSIONNUMBER WITH 1, LASTUPDATE WITH DATETIME()
? TABLEUPDATE(.T.)
REPLACE DBCFILE WITH REPLICATE("@", 200000), DCXFILE WITH REPLICATE("@", 250000), DCTFILE WITH REPLICATE("@", 900000)
? TABLEUPDATE(.T.)
-or-
- Set the driver in SQL 6.5 compatibility mode. For more information on how to set the compatibility mode of the SQL driver, see the References section.
REFERENCESFor additional information on how to set the compatibility mode of the SQL driver, click the article number below
to view the article in the Microsoft Knowledge Base:
231812 HOWTO: Programmatically Set the Compatibility Level of the SQL Server ODBC Driver
Modification Type: | Major | Last Reviewed: | 3/17/2005 |
---|
Keywords: | kbCodeSnippet kbprb kbSQLProg KB245714 |
---|
|