PRB: Error 'OLE Object is Invalid or Corrupt' on Empty Gen FieldLast reviewed: May 30, 1997Article ID: Q169154 |
The information in this article applies to:
SYMPTOMSWhen upsizing FoxPro data to an SQL server, empty general field records may cause an error when browsing the resulting SQL table.
CAUSEThis is caused by an empty general field being upsized as an hex 20 (which is a space character). FoxPro expects to see binary data in the general field rather than an ASCII character.
RESOLUTIONThe problem can be avoided by setting the General field to accept NULL values. This can be done in either of two methods when creating the table: programmatically or visually. To programmatically allow a NULL value, use the NULL keyword when creating the field in the table.
* The following line of code creates a table called 'gendata'. The * General field in the table, 'gfield' accepts NULL values. CREATE TABLE gendata (gfield G NULL)To set the field to accept NULL values using the visual interface, place a check mark in the NULL column for the field, in the Table Designer dialog box.
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce BehaviorThere are three parts in setting up this example: Part 1 is to create a small table with empty general records to be used in the Upsize Wizard. Part 2 is to upsize the data to an SQL server. Part 3 is to create a remote view of the SQL data to observe the error. Part 1 - Create a table with empty general field records: Save the following code to a file called Creatabl.prg:
*** Begin code *** CLOSE ALL CREATE DATABASE test CREATE TABLE gendata (gfield G) APPEND BLANK APPEND BLANK APPEND BLANK GO 1 APPEND GENERAL gfield FROM c:\windows\waves.bmp GO 3 APPEND GENERAL gfield FROM c:\windows\tiles.bmp *** End code ***Part 2 - Upsize the data to an SQL server:
Keywords : FxinteropDbase FxprgSql vfoxwin kbcode kberrmsg Version : 5.0 5.0a Platform : WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |