我想在 *.db 的数据表中动态的添加字段(0分)

  • 主题发起人 主题发起人 阿宏
  • 开始时间 开始时间

阿宏

Unregistered / Unconfirmed
GUEST, unregistred user!
我想在 *.db 的数据表中动态的添加字段

我试用TQUERY

query1.close;
query1.sql.clear;
query1.sql.add('alter table country.db add column nametoo char(10)');
query1.open;

运行时报错。
小弟不才不字段怎么做?求教!!!!!!
 
TmpSQL:='alter table libvol001 add ' +
format('%s',[dbedit1.text]) + ' ' + f_type(dbcombobox1.text)
 
我去试试谢谢大哥了。
 
query1.execute
 
var
tsql:string;
begin
tsql:='alter table test add '+format('%s',[edit1.Text])+' '+'number';
query1.Close;
query1.SQL.Clear;
query1.SQL.Text:=tsql;
query1.Open;



不支持这种性能。大虾帮帮我。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
926
SUNSTONE的Delphi笔记
S
后退
顶部