???
解决方案 »
- 如何创建动态BUTTON并且保存
- 请教:DBGridEh双击弹出修改窗口,修改了数据后,返回DBGridEh,要看到最新修改的
- 大家都知道D2010的RTTI得到了极大的增强,不知道是否也和.net那样支持动态编译呢?
- 【投票】2004年上半年Delphi版牛奖投票
- 怎么样实现用程序控制下载呢?
- 主菜单调用 dll 中的子窗口,使用了ShowModal方式,如何让主窗口还可以使用?
- 三层架构的问题:
- 从Tpanel继承一个组件,其中用到的一个组件有onbuttonclick事件,我怎样在我的组件中发布这个事件
- update table set string_field=string_field+'my home' 出现错误?
- 用Delphi开发Mis系统的一个小问题?
- 问一个CoUninitialize在哪个单元声明呢
- 为自己公司拉项目,该拿多少提成合适呢
The following example shows how to create a table.{ Don't overwrite an existing table }if not Table1.Exists then begin
with Table1 do begin
{ The Table component must not be active }
Active := False;
{ First, describe the type of table and give }
{ it a name }
DatabaseName := 'DBDEMOS';
TableType := ttParadox;
TableName := 'CustInfo';
{ Next, describe the fields in the table }
with FieldDefs do begin
Clear;
with AddFieldDef do begin Name := 'Field1';
DataType := ftInteger;
Required := True;
end;
with AddFieldDef do begin
Name := 'Field2';
DataType := ftString;
Size := 30;
end;
end;
{ Next, describe any indexes }
with IndexDefs do begin
Clear;
{ The 1st index has no name because it is
{ a Paradox primary key }
with AddIndexDef do begin Name := '';
Fields := 'Field1';
Options := [ixPrimary];
end;
with AddIndexDef do begin
Name := 'Fld2Indx';
Fields := 'Field2';
Options := [ixCaseInsensitive];
end;
end;
{ Call the CreateTable method to create the table }
CreateTable;
end;
end; 呵呵。给分!