unit s1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleServer, Access2000;type
TForm1 = class(TForm)
AccessApplication1: TAccessApplication;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
AccessApplication1.OpenCurrentDatabase('f:\bingdb2.mdb',false,'''');
AccessApplication1.DoCmd.TransferSpreadsheet(acImport, acSpreadsheetTypeExcel8,
'yinbing', 'f:\b.xls', -1,true,'')
AccessApplication1.CloseCurrentDatabase;end;end.
[Error] s1.pas(29): Too many actual parameters
[Error] s1.pas(31): Missing operator or semicolon
[Fatal Error] sa.dpr(5): Could not compile used unit 's1.pas'怎么办?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleServer, Access2000;type
TForm1 = class(TForm)
AccessApplication1: TAccessApplication;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
AccessApplication1.OpenCurrentDatabase('f:\bingdb2.mdb',false,'''');
AccessApplication1.DoCmd.TransferSpreadsheet(acImport, acSpreadsheetTypeExcel8,
'yinbing', 'f:\b.xls', -1,true,'')
AccessApplication1.CloseCurrentDatabase;end;end.
[Error] s1.pas(29): Too many actual parameters
[Error] s1.pas(31): Missing operator or semicolon
[Fatal Error] sa.dpr(5): Could not compile used unit 's1.pas'怎么办?
解决方案 »
- 在前台中打開數據庫裡面的文件
- d6, quickreport3.0.9, pagefooter为什么显示不出来??? 急呀!!!
- 菜鸟的问题 请大虾们多多指教哈
- 大家给点意见
- 怎样重新编译组件包?高分
- 一个小问题?
- 有没有办法自己释放自己, 比如一个button,当我点击button时, button 就free 掉, 不管用那种方法都可以,我现在急需解决类似的问题
- 我在MDI Form中放了一个WebBrowser为个当打开其他窗体、或打开IE时,我的MDI Form就不见了????急!急!急!
- 我把delphi5安装盘的文件拷贝到硬盘,为何不能安装了???
- 请教一个数据导出、导入的问题。
- 感谢小95,让我在有生之年看到大95放分。
- delphi新手,师兄师姐比吝赐教噢!(先和大家见个面)
querysql.ExecSQL();
var
StrSql:string;
begin StrSql := 'SELECT * into hh5 FROM [sheet1$] IN "D:\hh\练习文件夹\杂称\将Excel中的数据表倒入数据库\book1.xls" "EXCEL 5.0;"';
ADOConnection1.Execute(StrSql);
end;