sTempPath:='c:\windows\temp\temp.mdb'; sacTableName:='Temp'+FormatDateTime('hhmmss',Time()); //创建Access Application对象,并打开Access临时数据库 AA:=CreateOleObject('Access.Application'); if not FileExists(sTempPath) then AA.NewCurrentDatabase(sTempPath) else AA.OpenCurrentDatabase(sTempPath,false); if ExitEnabled=true then Exit; AA.DoCmd.TransferText(acImportDelim,'',sacTableName,sPathNameStr,true,'',0); AA.CloseCurrentDatabase;
sacTableName:='Temp'+FormatDateTime('hhmmss',Time()); //创建Access Application对象,并打开Access临时数据库
AA:=CreateOleObject('Access.Application');
if not FileExists(sTempPath)
then AA.NewCurrentDatabase(sTempPath)
else AA.OpenCurrentDatabase(sTempPath,false);
if ExitEnabled=true then Exit;
AA.DoCmd.TransferText(acImportDelim,'',sacTableName,sPathNameStr,true,'',0);
AA.CloseCurrentDatabase;
谢谢
能不能详细点,比如 表结构怎么确定呢?