Delphi

Delphi

Delphi try except与try finally不同之处

38 0

try except与try finally不同之处  try//尝试执行    {SomeCode}   except//出错的时候执行, Except有特定的错误类型     {SomeCode}   end;   try//尝试执行    {SomeCode}   finally//无论如何都强制执行    {SomeCode}   end; 例:try Age:=StrToInt(Edit1.Text); ShowMessage(Format('生于%d年',[Ye

Delphi

Delphi 字符串操作之格式化

86 0

函数 function Format(const Format: string; const Args: array of const): string; 需引用 SysUtils.pas功能 返回按指定方式格式化一个数组常量的字符形式说明 这个函数是我在Delphi中用得最多的函数,现在就列举几个例子给你个直观的理解"%" [索引 ":"] ["-"] [宽度] ["." 摘要] 类型Format('x=%d&#

Delphi

delphi执行查询语句时的进度条怎么做

67 0

procedure TForm1.FormCreate(Sender: TObject); begin ADOQuery1.ExecuteOptions := [eoAsyncFetch];//设为异步读取 end; //ADOQuery的OnFetchProgress事件 procedure TForm1.ADOQuery1FetchProgress(DataSet: TCustomADODataSet; Progress, MaxProgress: Integer; var Even

Delphi

Delphi 从字符串中提取单词的函数

37 0

{从字符串中提取单词的函数}procedure StrToWordList(str: string; var List: TStringList);var p: PChar; i: Integer;begin if List = nil then List := TStringList.Create; List.Clear; {去除重复} List.Sorted := True; List.Duplicates := dupIgnore; p := PChar(str); {把单词

Delphi

如何访问局域网的Access数据库

202 0

如何访问局域网的Access数据库?1]用共享打印机来打开文件共享,2]把Access文件.mdb所在的文件夹 共享,然后其他的就和本地一样了。 设置如下: Data Source="\\192.168.7.49\user\WFsendat.mdb" 共享user文件夹

Delphi

Delphi中ClientDataSet的用法小结

48 0

Delphi中ClientDataSet的用法小结TClientDataSet控件继承自TDataSet,其数据存储文件格式扩展名为 .cds,是基于文件型数据存储和操作的控件。该控件封装了对数据进行操作处理的接口和功能,而本身并不依赖上述几种数据库驱动程序,基本上能满足单机"瘦"数据库应用程序的需要。 一、TClientDataSet的基本属性和方法介绍 1、FieldDefs: 字段定义列表属性 开发者可通过单击属性编辑器中该属性编辑按钮,或在该控件上单击右