关于DBF数据库与Ado控件

fantom 2002-05-31 01:15:38
在程序中可以用标准的Ado控件动态生成一个新的DBF文件吗?
可以的话要怎么生成
...全文
35 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
forgot 2002-05-31
  • 打赏
  • 举报
回复
两种方法:
1。直接用sql写:
str := 'create table aaa (teleno char(7))';
conn.Execute(str);
str := 'insert into aaa(teleno) values(''hello'')';
conn.execute(str);

2.使用adotable:
str := 'create table aaa (teleno char(7))';
conn.Execute(str);
with ADOTable1 do
begin
TableName := 'aaa';
active := true;
insert;
fields[0].AsString := 'hlll';
post;
insert;
fields[0].asstring := 'ddsiewewewe';
post;
Active := false;
end;
僵哥 2002-05-31
  • 打赏
  • 举报
回复
能,用SQL语句的Create Table ……就行了。

2,498

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧