亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? blobdemo.pas

?? TCompress Component Set For Delphi Kylix BCB v9.0
?? PAS
字號:
(* BLOBDEMO.PAS for TCompress V3.0 (only comments changed from V2.5)

   This unit provides example code for two things:
   1. On-the-fly creation of compressed blob fields
   2. Writing and reading of any kind of data (e.g. arrays, AVI, WAV etc)
      to/from a compressed blob field.

   Before running the program, you need to use the Database Desktop to create
   a table called BLOB.DB in the DBDEMOS alias which contains a 'Name' field (A10)
   and a 'Data' field (B0). For a full test, you'd also want to add routines
   to put meaningful data into the OurData array, and display it
   before/after blob reads.  We're just compressing a bunch of zeros...

*)
unit Blobdemo;

interface

uses
{$IFDEF CLR}
  System.ComponentModel,
{$ENDIF}
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, Grids, DBGrids, ExtCtrls, DBCtrls, DB, DBTables,
  Compress, CompCtrl;       { <--- CompCtrl for the TCBlobField/TCBlobstream types }


type
  TForm1 = class(TForm)
    Table1: TTable;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    SaveArray: TButton;
    LoadArray: TButton;
    Compress1: TCompress;
    Table1Name: TStringField;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure SaveArrayClick(Sender: TObject);
    procedure LoadArrayClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  TestCount: Smallint; { just for making field names }

implementation

{$R *.NFM}

var  BlobDataField:TCBlobField;  { compressed field we'll set up at runtime }
     OurData: Array[1..8000] of byte; { Data to go to/from the field }

const SizeOfOurData = 8000;

{ Here, we create our compressed field BEFORE opening the table. Note that
  the field ('Data' in this case) should *not* appear in the list of fields
  you see when you double-click on the Grid or on Table1. If it is, remove it.
  If the list is blank, add whatever you need, but NOT 'Data'.            }

procedure TForm1.FormCreate(Sender: TObject);
begin
  BlobDataField := TCBlobField.Create(Self);
  BlobDataField.CompressSource := Compress1; { Our TCompress component     }
  BlobDataField.CompressionMethod := coRLE; { RLE compression, for example }
  BlobDataField.FieldName:='Data'; { or whatever you call it in the table }
  BlobDataField.Size := 0;         { The # of bytes stored WITHIN the table }
  BlobDataField.DataSet := Table1;
  try
    Table1.Open;  { Note: In Delphi 2.0+, we've edited our grid (double-click) to ensure
                  that the new field will NOT be added to the grid. This is
                  because the V2.0 grids try to detail with (and display) it as
                  a TBlobfield instead of a TCBlobfield, which causes spurious
                   "Blob not open" errors. Please adopt the same tactic if you
                   are working with custom blob fields like this in Delphi 2.
                 }
  except

(* This code here would be FINE except that for a Delphi VCL/BDE bug,
   -- telling it to create a table with a ftBlob field size zero
   (something perfectly possible in Database Desktop) results
   in a table with a ftBlob ('B') field size 1. This is a baaad
   thing and doesn't work for our purposes. So alas, we have to ask you
   to create the demo table manually. Sorry about that. It's a pain.

UPDATE April 97: This commented-out code should now work for Delphi 1, but
only by exploiting another bug which arises from setting TableType to ttDefault
instead of ttParadox. However, the GOOD news is that there is a VCL patch
available to remove the original bug -- for all Delphi versions. If you want
to know how to create a table with a 0-length Blob field in it, see
http://www.spis.co.nz/blobfix.htm

    with Table1 do
    begin
      DatabaseName := 'DBDEMOS';
      TableName := 'BLOB.DB';
      TableType := ttDefault; { if ttParadox, Delphi 1 will misbehave again }
      with FieldDefs do
      begin
        Clear;
        Add('Name', ftString, 10,True);
        Add('Data', ftBlob, 0,False);  { bzzzt -- wrong -- makes size 1, dammit! }
      end;
      IndexDefs.Clear;
      CreateTable;
      FieldDefs.Clear;
      temptable.free;
      Table1.Open; { open should work this time... but won't, due to above "spec" }
    end;
*)      { so instead, we: }
     showMessage('Please create a table called BLOB.DB in the'+#13+
                 'DBDEMOS alias, according to the specs in BLOBDEMO.PAS.'+#13+#13+
                 'THEN run this program again.');

  end;
end;



{ After all that, here's the enjoyable bits.... }

{ How to write/compress our array data to the blob }
procedure TForm1.SaveArrayClick(Sender: TObject);
var cbs: TCBlobstream;
begin
     { this is cosmetic stuff }
  Inc(TestCount);
  Table1.append; { put a new record in, what the heck (or you could just Edit) }
  Table1.FieldByName('Name').asstring := 'Test '+IntToStr(TestCount);

    { this is the IMPORTANT bit }
  cbs:= TCBlobstream.create(BlobDataField,bmWrite); { will save our data to it }
  cbs.writeBuffer(OurData,SizeOfOurData);         { standard stream method   }
  showmessage('Compressed and wrote '+IntToStr(cbs.size)+' bytes');
  cbs.free;    { done! (compression occurs just here...) }
  Table1.Post;
end;
{ Note: If the data was coming from a file or another object, you could use the
        CopyFrom method from the applicable filestream/memorystream/blobstream }


{ How to read/expand our data (of whatever nature) back into our array }
procedure TForm1.LoadArrayClick(Sender: TObject);
var cbs: TCBlobstream;
    bs: TBlobStream;
begin
  cbs:= TCBlobstream.create(BlobDataField,bmRead); { will read our data from it }
  cbs.readBuffer(OurData,sizeof(OurData));         { standard stream method   }
  showmessage('Expanded and read '+IntToStr(cbs.size)+' bytes');
  cbs.free;

  { Oh, and by the way... }
  bs := TBlobStream.Create(BlobDataField,bmread); { a handle on our RAW (compressed) data }
  showmessage('By the way, that was stored in only '+IntToStr(bs.size)+' bytes');
  bs.free;
end;

{ Cleanup code }
procedure TForm1.FormDestroy(Sender: TObject);
begin
  if Table1.Active then Table1.close;
  BlobDataField.free;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区精华液| 亚洲一区二区三区四区五区黄| 国产精品三级av在线播放| 亚洲免费av观看| 激情六月婷婷久久| 欧美亚一区二区| 中文字幕av不卡| 麻豆精品一二三| 欧美亚洲国产一区在线观看网站 | 一区二区欧美国产| 国产真实乱子伦精品视频| 欧美亚洲国产一区二区三区va | 中文字幕av在线一区二区三区| 日韩和欧美一区二区三区| www.亚洲色图.com| 久久久久久麻豆| 久久国产精品色| 欧美日本国产视频| 亚洲愉拍自拍另类高清精品| 成人av片在线观看| 久久免费美女视频| 狠狠网亚洲精品| 欧美一区二区三区啪啪| 亚洲国产精品一区二区www在线| 不卡区在线中文字幕| 久久久久久久久久久99999| 另类欧美日韩国产在线| 欧美一区二区久久| 日韩电影在线观看网站| 欧美日韩1区2区| 一个色在线综合| 欧美视频一区在线| 天堂成人国产精品一区| 欧美日韩二区三区| 天天操天天色综合| 日韩精品专区在线影院重磅| 美女被吸乳得到大胸91| 日韩免费观看高清完整版| 青椒成人免费视频| 精品国产一区二区三区久久影院 | 一区二区三区四区五区视频在线观看| 成人午夜电影网站| 国产精品久久久久婷婷| 久久se精品一区二区| 日韩精品一区二区三区视频| 日本aⅴ免费视频一区二区三区| 日本韩国欧美在线| 肉色丝袜一区二区| 日韩亚洲欧美在线观看| 韩国中文字幕2020精品| 精品国产亚洲在线| 国产精品影视在线| 综合久久给合久久狠狠狠97色| 91免费观看国产| 亚洲国产精品一区二区久久 | 国产婷婷色一区二区三区| 国产精品系列在线播放| 国产片一区二区| 一本大道久久a久久综合婷婷| 一区二区三区蜜桃网| 在线视频你懂得一区| 日av在线不卡| 国产精品全国免费观看高清 | 国产一区二区精品久久99| 国产精品毛片大码女人| 在线观看不卡一区| 肉色丝袜一区二区| 中文字幕不卡在线| 欧美一区二区三区白人| 国产盗摄一区二区| 亚洲成av人在线观看| 国产三级欧美三级日产三级99| 色综合天天视频在线观看| 奇米色777欧美一区二区| 欧美激情一区二区三区蜜桃视频| 欧美日韩一区成人| 不卡视频一二三| 久久综合综合久久综合| 亚洲精品久久嫩草网站秘色| 欧美一区二区在线免费播放| yourporn久久国产精品| 精品一区二区三区免费观看| 亚洲综合久久久久| 国产欧美一区二区三区沐欲| 4hu四虎永久在线影院成人| 成人国产在线观看| 久久99九九99精品| 亚洲va韩国va欧美va| 国产精品电影一区二区| www激情久久| 欧美日本韩国一区| 91社区在线播放| 国产成人免费在线视频| 日本亚洲视频在线| 亚洲一区二区三区中文字幕| 国产精品视频看| 久久久五月婷婷| 日韩欧美中文一区二区| 欧美三级午夜理伦三级中视频| 国产黄色精品网站| 国产一区二区三区免费看| 免费欧美日韩国产三级电影| 一二三区精品视频| 亚洲丝袜自拍清纯另类| 国产免费成人在线视频| 精品久久五月天| 日韩一区二区精品| 日韩一区二区电影网| 5858s免费视频成人| 欧美在线小视频| 欧美中文字幕不卡| 欧美美女网站色| 欧美日韩国产小视频在线观看| 91麻豆国产在线观看| 91丨porny丨最新| www.欧美日韩| 91视频免费播放| 91香蕉国产在线观看软件| 色综合中文综合网| 爽好多水快深点欧美视频| 亚洲一区二区三区美女| 国产99久久久精品| 成人免费毛片高清视频| 成人免费视频视频在线观看免费 | 国产日韩v精品一区二区| 欧美国产一区在线| 1区2区3区国产精品| 亚洲在线视频网站| 免费精品视频在线| 国产激情一区二区三区四区| 成人av高清在线| 在线免费av一区| 欧美日韩卡一卡二| 日韩精品一区二区三区视频在线观看| 精品成人一区二区三区四区| 国产精品色婷婷久久58| 一区二区三区日韩精品| 日韩极品在线观看| 国产成人一级电影| 99久久精品国产毛片| 欧美性受极品xxxx喷水| 精品精品国产高清a毛片牛牛| 国产精品素人一区二区| 一区二区久久久| 久久99久国产精品黄毛片色诱| 不卡高清视频专区| 欧美一区二区三区啪啪| 国产精品网站一区| 五月天欧美精品| 国产成人av自拍| 欧美日韩午夜在线视频| 国产欧美视频一区二区三区| 亚洲午夜久久久久| 国产专区欧美精品| 在线观看亚洲精品视频| 日韩欧美三级在线| 一区二区三区91| 国产不卡在线播放| 欧美美女一区二区在线观看| 亚洲国产精品成人久久综合一区| 亚洲成a人片在线不卡一二三区| 成人做爰69片免费看网站| 91超碰这里只有精品国产| 中文字幕一区二区三区乱码在线| 日本成人在线视频网站| 91免费观看视频| 国产日本亚洲高清| 全部av―极品视觉盛宴亚洲| 91在线免费视频观看| 2019国产精品| 水蜜桃久久夜色精品一区的特点| 91性感美女视频| 日本一区二区三区国色天香| 三级久久三级久久久| 在线亚洲一区观看| 亚洲视频一二三| 国产精品1区二区.| 精品日产卡一卡二卡麻豆| 午夜精品福利久久久| 91国产成人在线| 中文字幕一区二区三区在线观看| 久久99久久99小草精品免视看| 欧美人伦禁忌dvd放荡欲情| 亚洲精品菠萝久久久久久久| 成人一道本在线| 久久人人爽人人爽| 国产在线国偷精品免费看| 6080亚洲精品一区二区| 亚洲一区中文在线| 91福利社在线观看| 亚洲最新视频在线观看| 91在线视频官网| 亚洲激情在线播放| 97aⅴ精品视频一二三区| 亚洲色图欧美偷拍| av电影天堂一区二区在线| 国产欧美日产一区| aa级大片欧美| 一区二区三区在线免费播放| 91福利精品视频|