var
path:string;
empty:OleVariant;
begin
path := extractfilepath(application.Exename);
empty :=emptyparam;
with accessapplication1 do
begin
connect;
opencurrentdatabase(path+'E:\人大\data\data.mdb',false,");
// 这句话报错,请问错在哪里啊,下面是错误提示
[Error] Unit1.pas(37): Illegal character in input file: '"' ($22)
//如果我这样写的话opencurrentdatabase(path+'E:\人大\data\data.mdb',false);
//程序可以运行,但运行以后他说数据已经打开
visible:=true;
docmd.transferspreadsheet(acimport,acspreadsheettypeexcel8,'employee',path+'sdbk1.xls',true,empty,empty);
end;
path:string;
empty:OleVariant;
begin
path := extractfilepath(application.Exename);
empty :=emptyparam;
with accessapplication1 do
begin
connect;
opencurrentdatabase(path+'E:\人大\data\data.mdb',false,");
// 这句话报错,请问错在哪里啊,下面是错误提示
[Error] Unit1.pas(37): Illegal character in input file: '"' ($22)
//如果我这样写的话opencurrentdatabase(path+'E:\人大\data\data.mdb',false);
//程序可以运行,但运行以后他说数据已经打开
visible:=true;
docmd.transferspreadsheet(acimport,acspreadsheettypeexcel8,'employee',path+'sdbk1.xls',true,empty,empty);
end;
我早试了,
但我把这句写成
opencurrentdatabase(path+'E:\人大\data\data.mdb',false,");
//改为
opencurrentdatabase(path+'E:\人大\data\data.mdb',false);//去掉了后面的反倒没什么问题
//还有一定要把要转换的数据放在当前应用程序目录下,要不就找不到数据。
我想应该不是合法的路径名吧!!D:\Back\E:\人大\data\data.mdb
这是什么呀?
opencurrentdatabase('E:\人大\data\data.mdb',false);