?? 使用bdeapi實現查詢結果的物理存儲 (2001年3月13.txt
字號:
使用BDEAPI實現查詢結果的物理存儲 (2001年3月13日)
網友更新 分類:數據庫 作者:閻磊 推薦:yanlei 閱讀次數:267
(http://www.codesky.net)
--------------------------------------------------------------------------------
在form1上放一個query1,設databasename=DBDEMOS,sql.Tstring為select * from country
放兩個按鈕button1,button2
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db,BDE, StdCtrls, DBTables;
type
TForm1 = class(TForm)
query1: TQuery;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
hd: HDBICur;
ph : PHDBICur;
begin
query1.Prepare;
Check(dbiQExec(query1.StmtHandle, ph));
hd:= ph^;
Check(DbiMakePermanent(hd, Pchar(ExtractFilePath(Application.ExeName)+'q1.db'), True));
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Application.Terminate;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -