W
wind520
Unregistered / Unconfirmed
GUEST, unregistred user!
我在数据库中添加记录(不用线程)
for i:=0 to List.count-1
begin
aStr:=List;
B:=Copy(aStr,1,4);
StrSQl:=' Insert into aa.dbf (Bh,name,Position)'+
' Select Bh,name,'+''''+aStr+''''+' from bb where name='''+B+'''';
Dm.ExecuteDate(DM.Query1,StrSQL);
end;
Function TDM.ExecuteDate(DataSet: TQuery;Str:String):Boolean;
begin
Result:=false;
with DataSetdo
begin
Close;
SQL.Clear;
SQL.Add(Str);
try
ExecSQL;
except
exit;
end;
end;
Result:=true;
end;
for i:=0 to List.count-1
begin
aStr:=List;
B:=Copy(aStr,1,4);
StrSQl:=' Insert into aa.dbf (Bh,name,Position)'+
' Select Bh,name,'+''''+aStr+''''+' from bb where name='''+B+'''';
Dm.ExecuteDate(DM.Query1,StrSQL);
end;
Function TDM.ExecuteDate(DataSet: TQuery;Str:String):Boolean;
begin
Result:=false;
with DataSetdo
begin
Close;
SQL.Clear;
SQL.Add(Str);
try
ExecSQL;
except
exit;
end;
end;
Result:=true;
end;