Z
zhhyoushen
Unregistered / Unconfirmed
GUEST, unregistred user!
我需要在两个access数据库大量倒数据 语句如下(不要嫌长哦)
Gauge1.Max := 28;
//Gauge1.Position := Gauge1.Position + 1;
DM1.Qtemp1.DatabaseName := '';
DM1.Qtemp1.RequestLive := false;
try
Label1.Caption := '请稍后,正在进行数据筛选...';
DM1.Qtemp1.SQL.Clear; //清空会员表
DM1.Qtemp1.SQL.Add('Delete from "B2:associator"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入会员
DM1.Qtemp1.SQL.Add('insert into "B2:associator"');
DM1.QTemp1.SQL.Add('select * from "B1:associator" Associator_1 where Associator_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空出版社表
DM1.Qtemp1.SQL.Add('Delete from "B2:bookmaker"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入出版社
DM1.Qtemp1.SQL.Add('insert into "B2:bookmaker"');
DM1.QTemp1.SQL.Add('select * from "B1:bookmaker" bookmaker_1 where bookmaker_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空供货商表
DM1.Qtemp1.SQL.Add('Delete from "B2:client"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入供货商
DM1.Qtemp1.SQL.Add('insert into "B2:client"');
DM1.QTemp1.SQL.Add('select * from "B1:client" client_1 where client_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空Goods表
DM1.Qtemp1.SQL.Add('Delete from "B2:Goods"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入Goods
DM1.Qtemp1.SQL.Add('insert into "B2:Goods"');
DM1.QTemp1.SQL.Add('select * from "B1:Goods" Goods_1 where Goods_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空index表
DM1.Qtemp1.SQL.Add('Delete from "B2:index"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入index
DM1.Qtemp1.SQL.Add('insert into "B2:index"');
DM1.QTemp1.SQL.Add('select * from "B1:index" index_1 where index_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空info_goods表
DM1.Qtemp1.SQL.Add('Delete from "B2:info_goods"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入info_goods
DM1.Qtemp1.SQL.Add('insert into "B2:info_goods"');
DM1.QTemp1.SQL.Add('select * from "B1:info_goods" info_goods_1 where info_goods_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空list表
DM1.Qtemp1.SQL.Add('Delete from "B2:list"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入list
DM1.Qtemp1.SQL.Add('insert into "B2:list"');
DM1.QTemp1.SQL.Add('select * from "B1:list" list_1 where list_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空person表
DM1.Qtemp1.SQL.Add('Delete from "B2erson"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入person
DM1.Qtemp1.SQL.Add('insert into "B2erson"');
DM1.QTemp1.SQL.Add('select * from "B1erson" person_1 where person_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空price表
DM1.Qtemp1.SQL.Add('Delete from "B2rice"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入price
DM1.Qtemp1.SQL.Add('insert into "B2rice"');
DM1.QTemp1.SQL.Add('select * from "B1rice" price_1 where price_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空remove表
DM1.Qtemp1.SQL.Add('Delete from "B2:remove"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入remove
DM1.Qtemp1.SQL.Add('insert into "B2:remove"');
DM1.QTemp1.SQL.Add('select * from "B1:remove" remove_1 where remove_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空stock_in表
DM1.Qtemp1.SQL.Add('Delete from "B2:stock_in"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入stock_in
DM1.Qtemp1.SQL.Add('insert into "B2:stock_in"');
DM1.QTemp1.SQL.Add('select * from "B1:stock_in" stock_in_1 where stock_in_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空stock_money表
DM1.Qtemp1.SQL.Add('Delete from "B2:stock_money"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入stock_money
DM1.Qtemp1.SQL.Add('insert into "B2:stock_money"');
DM1.QTemp1.SQL.Add('select * from "B1:stock_money" stock_money_1 where stock_money_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空stock_out表
DM1.Qtemp1.SQL.Add('Delete from "B2:stock_out"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入stock_out
DM1.Qtemp1.SQL.Add('insert into "B2:stock_out"');
DM1.QTemp1.SQL.Add('select * from "B1:stock_out" stock_out_1 where stock_out_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空Tint表
DM1.Qtemp1.SQL.Add('Delete from "B2:Tint"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入Tint
DM1.Qtemp1.SQL.Add('insert into "B2:Tint"');
DM1.QTemp1.SQL.Add('select * from "B1:Tint" Tint_1 where Tint_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
分开运行没有问题,合起来运行就报错“access violation at address 4d9f562b in module'idodbc32.dll'”
没办法了,请各位帮忙看看
Gauge1.Max := 28;
//Gauge1.Position := Gauge1.Position + 1;
DM1.Qtemp1.DatabaseName := '';
DM1.Qtemp1.RequestLive := false;
try
Label1.Caption := '请稍后,正在进行数据筛选...';
DM1.Qtemp1.SQL.Clear; //清空会员表
DM1.Qtemp1.SQL.Add('Delete from "B2:associator"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入会员
DM1.Qtemp1.SQL.Add('insert into "B2:associator"');
DM1.QTemp1.SQL.Add('select * from "B1:associator" Associator_1 where Associator_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空出版社表
DM1.Qtemp1.SQL.Add('Delete from "B2:bookmaker"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入出版社
DM1.Qtemp1.SQL.Add('insert into "B2:bookmaker"');
DM1.QTemp1.SQL.Add('select * from "B1:bookmaker" bookmaker_1 where bookmaker_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空供货商表
DM1.Qtemp1.SQL.Add('Delete from "B2:client"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入供货商
DM1.Qtemp1.SQL.Add('insert into "B2:client"');
DM1.QTemp1.SQL.Add('select * from "B1:client" client_1 where client_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空Goods表
DM1.Qtemp1.SQL.Add('Delete from "B2:Goods"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入Goods
DM1.Qtemp1.SQL.Add('insert into "B2:Goods"');
DM1.QTemp1.SQL.Add('select * from "B1:Goods" Goods_1 where Goods_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空index表
DM1.Qtemp1.SQL.Add('Delete from "B2:index"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入index
DM1.Qtemp1.SQL.Add('insert into "B2:index"');
DM1.QTemp1.SQL.Add('select * from "B1:index" index_1 where index_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空info_goods表
DM1.Qtemp1.SQL.Add('Delete from "B2:info_goods"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入info_goods
DM1.Qtemp1.SQL.Add('insert into "B2:info_goods"');
DM1.QTemp1.SQL.Add('select * from "B1:info_goods" info_goods_1 where info_goods_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空list表
DM1.Qtemp1.SQL.Add('Delete from "B2:list"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入list
DM1.Qtemp1.SQL.Add('insert into "B2:list"');
DM1.QTemp1.SQL.Add('select * from "B1:list" list_1 where list_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空person表
DM1.Qtemp1.SQL.Add('Delete from "B2erson"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入person
DM1.Qtemp1.SQL.Add('insert into "B2erson"');
DM1.QTemp1.SQL.Add('select * from "B1erson" person_1 where person_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空price表
DM1.Qtemp1.SQL.Add('Delete from "B2rice"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入price
DM1.Qtemp1.SQL.Add('insert into "B2rice"');
DM1.QTemp1.SQL.Add('select * from "B1rice" price_1 where price_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空remove表
DM1.Qtemp1.SQL.Add('Delete from "B2:remove"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入remove
DM1.Qtemp1.SQL.Add('insert into "B2:remove"');
DM1.QTemp1.SQL.Add('select * from "B1:remove" remove_1 where remove_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空stock_in表
DM1.Qtemp1.SQL.Add('Delete from "B2:stock_in"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入stock_in
DM1.Qtemp1.SQL.Add('insert into "B2:stock_in"');
DM1.QTemp1.SQL.Add('select * from "B1:stock_in" stock_in_1 where stock_in_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空stock_money表
DM1.Qtemp1.SQL.Add('Delete from "B2:stock_money"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入stock_money
DM1.Qtemp1.SQL.Add('insert into "B2:stock_money"');
DM1.QTemp1.SQL.Add('select * from "B1:stock_money" stock_money_1 where stock_money_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空stock_out表
DM1.Qtemp1.SQL.Add('Delete from "B2:stock_out"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入stock_out
DM1.Qtemp1.SQL.Add('insert into "B2:stock_out"');
DM1.QTemp1.SQL.Add('select * from "B1:stock_out" stock_out_1 where stock_out_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //清空Tint表
DM1.Qtemp1.SQL.Add('Delete from "B2:Tint"');
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
try
DM1.Qtemp1.SQL.Clear; //写入Tint
DM1.Qtemp1.SQL.Add('insert into "B2:Tint"');
DM1.QTemp1.SQL.Add('select * from "B1:Tint" Tint_1 where Tint_1.dupdate>:s1');
DM1.QTemp1.ParamByName('s1').asdatetime := Self.dUpdate;
Dm1.Qtemp1.ExecSQL;
finally
Gauge1.Position := Gauge1.Position + 1;
end;
分开运行没有问题,合起来运行就报错“access violation at address 4d9f562b in module'idodbc32.dll'”
没办法了,请各位帮忙看看