关于数据更新

yealier 2003-08-18 04:16:50
我在服务器端用的ADOQuery
然后定义了一个接口INSERT
代码如下:
procedure TCcrT_BasicInfo.Insert(const ID, Name, Birthday, Enroll, Dept,
Station: WideString);
var
Str: string;
begin
Str := 'Insert into t_basicinfo ';
Str := str + ' Values ( ' + '''' + ID + ''',' + '''' +Name + ''','
+ '''' + Birthday + ''',' + '''' + Enroll + ''','
+ '''' + Dept + ''',' + '''' + Station + ''' )';

with ADOQryT_BasicInfo do
begin
Close;
Sql.Clear;
Sql.Add(Str);
ExecSql;
end;
end;

而在客户端的代码如下
DmClient.SckT_basicInfo.AppServer.Insert(edit1.Text,edit4.Text,edit2.Text,edit5.Text,edit3.Text,edit6.Text );
DmClient.CdsT_BasicInfo.Refresh;

然后就报错,说是两次添加,这个怎么解决
...全文
28 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
空中居士 2003-08-29
  • 打赏
  • 举报
回复
d5以后,数据更新早就不用这样的接口了,自己也该更新一下知识了。
自己查一下吧。

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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