Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FetchMemo property of a remote view
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01209228
Message ID:
01209695
Vues:
18
Here is the example that may help to understand when FetchMemo should be used:
CLEAR 
close tables all
ERASE c:\book1.xls
	
* Create Excel Test file
oExcel= CREATEOBJECT("Excel.Application")

with oExcel
	.DisplayAlerts = .f.
	.Workbooks.add()	
	WITH .Activesheet
		.cells(1,1).value="ID"
		.cells(2,1).value=1
		.cells(3,1).value=2
		.cells(1,2).value="Memofield"
		.cells(2,2).value=REPLICATE("long text     ",250)+ "END"
		.cells(3,2).value=REPLICATE("long text     ",1250)+ "END"
		
	ENDWITH
	.visible=.t.
	.activeworkbook.saveas("c:\book1.xls")
ENDWITH
oExcel.quit
oExcel=null

* Test how fetchMemo works:
CURSORSETPROP("FetchMemo",.f.,0)  && set FetchMemo .f.
store SQLSTRINGCONNECT(;
	"DRIVER={Microsoft Excel Driver (*.xls)};" + ;
	"FIL=Excel 97;" + ;
	"DefaultDir=c:\;" + ;
	"DBQ=c:\book1.xls");
	TO gnConnHandle	
?SQLexec(gnConnHandle, 'select * from "sheet1$"', "fetchno")
* memofield appears empty

CURSORSETPROP("FetchMemo",.T.,0)  && set FetchMemo .t.
?SQLexec(gnConnHandle, 'select * from "sheet1$"', "fetchyes")
* memofield appears properly

SQLDISCONNECT(gnConnHandle)
>Hi all:
>
>When do we need to set FETCHMEMO = .t. for a remote view? The documentation available (MSDN, VFP help) does not seem clear to me. I think it is for performance purposes, but I tried to do performance tests (multiple loops and requery the views and check how long it takes, using remote views with large text fields on the data set), but it seems the difference is not significant enough to say that there is a difference at all.
>
>Anybody who can shed light on this is highly appreciated.
>
>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform