F1Book ReadFromBlob和WriteToBlob用法(200)

  • 主题发起人 主题发起人 hongxing_dl
  • 开始时间 开始时间
H

hongxing_dl

Unregistered / Unconfirmed
GUEST, unregistred user!
如题:请各位了解F1BOOK的帮忙贴出例子解答解答,[red]ReadFromBlob[/red]和[red]WriteToBlob[/red]均需要不胜感激!!!
 
估计没什么人能帮到你了。因为基本上没多少人用这东东。
 
顶起来,应该有对这个东西熟悉的吧.....
 
TBLOBFIELD(DATASET.FIELDBYNAME('FIELD_NAME')).SAVETOFILE(FILE_NAME); TBLOBFIELD(DATASET.FIELDBYNAME('FIELD_NAME')).LOADFROMFILE(FILE_NAME);
 
题目是F1BOOK的WriteToBlob和ReadFromBlob用法,要有例子,谢谢
 
Google了一下,找了段代码,你看能不能用:procedure FromStream(AStream: TStream;ABook: F1Book);var Handle: DWORD; Size: DWORD; P: Pointer;begin AStream.ReadBuffer(Size, SizeOf(Size)); Handle := GlobalAlloc(GMEM_MOVEABLE, Size + SizeOf(Size)); try P := GlobalLock(Handle); try PDWORD(P)^ := Size; AStream.ReadBuffer(Pointer(DWORD(P) + SizeOf(Size))^, Size); finally GlobalUnlock(Handle); end; ABook.ReadFromBlob(Handle, 0); finally GlobalFree(Handle); end; end; procedure ToStream(ABook: F1Book; AStream: TStream);var Handle: DWORD; Size: DWORD; P: Pointer;begin Handle := ABook.WriteToBlobEx(0); try P := GlobalLock(Handle); try Size := PDWORD(P)^; AStream.WriteBuffer(P^, Size+SizeOf(Size)); finally GlobalUnlock(Handle); end; finally GlobalFree(Handle); end; end;
 
后退
顶部