The information in this article applies to:
SUMMARYThis article explains how to place OLE information into a SQL table by using the SQL Pass Through (SPT) function SQLEXEC(). To achieve this, you need to pass the field as a parameter instead of passing a file name value. MORE INFORMATIONTo place an OLE object such as a .wav or an .avi file into an Image field in a SQL table, you need to store it in a Visual FoxPro general field, and then call INSERT INTO to insert the general field in an Image field. For example, you can use the following syntax if you have a connection to a data source and you want to store the OLE information to an image field named imagfld:
In this example, the field name of the local table is passed as a parameter
to the server. This ensures that Visual FoxPro preserves the binary format
of the OLE object.
Note that if you pass the .wav file name in the INSERT command and bring the information back to Visual FoxPro, the error "OLE Object is invalid" is displayed when you click the General field. If you have an OLE object that is not stored in a .dbf file, you can create a temporary cursor and store the file in a cursor before you upload it. For example:
Additional query words:
Keywords : kbcode kbVFp300 kbVFp300b kbVFp600 FxinteropOdbc |
Last Reviewed: August 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |