X
xiagu
Unregistered / Unconfirmed
GUEST, unregistred user!
我在SQL中用这个可以用,
insert into test(zt,users,tel,fy)
SELECT zt,users,tel,fy
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="C:/Documents and Settings/Administrator/桌面/test.xls";Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False')...[sheet1$]
而在DELPHI中且不行,请各位大侠帮我看看错在那里,提示不正常的定义参数.提供了不一致
或不完整的信息.
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('insert into test(zt,users,tel,fy) ');
sql.Add('SELECT zt,user,tel,fy FROM') ;
sql.Add('OpenDataSource("Microsoft.Jet.OLEDB.4.0","Data Source="C:/Documents and Settings/Administrator/桌面/test.xls";Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False"...[sheet1$]');
execsql;
end;
insert into test(zt,users,tel,fy)
SELECT zt,users,tel,fy
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0','Data Source="C:/Documents and Settings/Administrator/桌面/test.xls";Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False')...[sheet1$]
而在DELPHI中且不行,请各位大侠帮我看看错在那里,提示不正常的定义参数.提供了不一致
或不完整的信息.
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('insert into test(zt,users,tel,fy) ');
sql.Add('SELECT zt,user,tel,fy FROM') ;
sql.Add('OpenDataSource("Microsoft.Jet.OLEDB.4.0","Data Source="C:/Documents and Settings/Administrator/桌面/test.xls";Extended Properties="Excel 5.0;HDR=Yes;";Persist Security Info=False"...[sheet1$]');
execsql;
end;