August 23, 2008 at 2:45 pm
Hi,
I have create a linkserver to read a vfp file with a photo field, the name and file STRUCTURE of vfp as follows:-
/*
ITEMPHOTO TABLE STRUCTURE
VFP: (ITEM_NO CHAR(10),ITEMPHOTO GENERAL)
SQL: (ITEM_NO CHAR(10),ITEMPHOTO IMAGE)
*/
The link server as follows:-
--EXEC SP_ADDLINKEDSERVER
-- @server = N'FOX2', -- YOUR LINKED SERVER NAME HERE
-- @SRVPRODUCT=N'VISUAL FOXPRO 9', -- CAN BE ANYTHING
-- @PROVIDER=N'VFPOLEDB',
-- @DATASRC=N'"C:\BTM\123\DATA1.DBC"'
--EXEC SP_ADDLINKEDSRVLOGIN 'FOX2'
After the server is created i checked to read the file without the photo field it is he read the file with no error, but with the photo field i have the below error :-
SELECT item_no,photo FROM OPENQUERY(FOXPRO,'SELECT item_no,photo FROM ITEMPHOTO')
the error message as follows:-
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "VFPOLEDB" for linked server "FOXPRO" reported an error. The provider ran out of memory.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider "VFPOLEDB" for linked server "FOXPRO".
best regards
August 28, 2008 at 6:56 am
try this
INSERT INTO IMAGESTABLE
(CUSTOMER_ID,IMAGEFIELD)
SELECT 1000001, BulkColumn
FROM OPENROWSET(BULK N'\\SERVER\DOSCAN\Testing\10987553578387.tif', SINGLE_BLOB) AS Document
August 28, 2008 at 7:08 am
as you see on my example the link server read the data from visual foxpro tables not a picture file.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply