请delphi高手帮忙改错,做了个将文本文件数据插入数据库的程序,但修改了很多次还是出错(200分)

  • 主题发起人 主题发起人 johnnywong
  • 开始时间 开始时间
J

johnnywong

Unregistered / Unconfirmed
GUEST, unregistred user!
这是check.pas的代码,Query中的databasename没设值(空的),运行错误 EDatabase Error with message "query1:field '文件名' is of an unknown type
整个程序的代码这里下载 http://johnnywong.myrice.com/other/newproject.zip
请帮我找check.pas中错误,小弟不胜感激,这个程序能不能做好直接影响到我的前途的!

unit check;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, XPMenu, Grids, DBGrids, DB, DBTables;

type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
XPMenu1: TXPMenu;
F1: TMenuItem;
O1: TMenuItem;
P1: TMenuItem;
X1: TMenuItem;
E1: TMenuItem;
H1: TMenuItem;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
OpenDialog1: TOpenDialog;
X2: TMenuItem;
Query1: TQuery;
procedure HandleStr(Str:string);
procedure ChkPost(PostField:string);
procedure O1Click(Sender: TObject);
procedure X2Click(Sender: TObject);
procedure ReadHead(Str:string);
procedure ReadEnd(Str:string);
procedure InsertName(fieldname:string);
procedure P1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
ChkFileName:string;

implementation

uses printset;

{$R *.dfm}

//将文本文件中的记录插入 mydata.db 表
procedure TForm1.HandleStr(Str:string);
var
input1,input2,input3,input4,input5,input6,input7,input8,input9,input10:string;
input11,input12,input13,input14,input15,input16,input17,input18,input19,input20:string;
input21,input22,input23,input24,input25:string;
output1,output2,output3,output4,output5,output6,output7,output8,output9,output10:string;
output11,output12,output13,output14,output15,output16,output17,output18,output19,output20:string;
output21,output22,output23,output24,output25:string;

NewStr:string;

begin
input1:=Copy(Str,1,6);
input2:=Copy(Str,7,6);
input3:=Copy(Str,13,19);
input4:=Copy(Str,32,6);
input5:=Copy(Str,38,12);
input6:=Copy(Str,50,6);
input7:=Copy(Str,56,8);
input8:=Copy(Str,64,6);
input9:=Copy(Str,70,12);
input10:=Copy(Str,82,4);
input11:=Copy(Str,86,12);
input12:=Copy(Str,98,2);
input13:=Copy(Str,100,6);
input14:=Copy(Str,106,8);
input15:=Copy(Str,114,15);
input16:=Copy(Str,129,19);
input17:=Copy(Str,148,3);
input18:=Copy(Str,151,12);
input19:=Copy(Str,163,1);
input20:=Copy(Str,164,1);
input21:=Copy(Str,165,4);
input22:=Copy(Str,169,6);
input23:=Copy(Str,175,6);
input24:=Copy(Str,181,4);
input25:=Copy(Str,185,4);

NewStr:=input1+input2+input3+input4+input5+input6+input7+input8+input9+input10
+input11+input12+input13+input14+input15+input16+input17+input18+input19+input20
+input21+input22+input23+input24+input25;

if Length(NewStr)<>188 then
begin
ShowMessage('源文件格式不符合要求,请校对!');
abort;
end;

output1:=stringreplace(input1,' ','',[rfReplaceAll]);
output2:=stringreplace(input2,' ','',[rfReplaceAll]);
output3:=stringreplace(input3,' ','',[rfReplaceAll]);
output4:=stringreplace(input4,' ','',[rfReplaceAll]);
output5:=stringreplace(input5,' ','',[rfReplaceAll]);
output6:=stringreplace(input6,' ','',[rfReplaceAll]);
output7:=stringreplace(input7,' ','',[rfReplaceAll]);
output8:=stringreplace(input8,' ','',[rfReplaceAll]);
output9:=stringreplace(input9,' ','',[rfReplaceAll]);
output10:=stringreplace(input10,' ','',[rfReplaceAll]);
output11:=stringreplace(input11,' ','',[rfReplaceAll]);
output12:=stringreplace(input12,' ','',[rfReplaceAll]);
output13:=stringreplace(input13,' ','',[rfReplaceAll]);
output14:=stringreplace(input14,' ','',[rfReplaceAll]);
output15:=stringreplace(input15,' ','',[rfReplaceAll]);
output16:=stringreplace(input16,' ','',[rfReplaceAll]);
output17:=stringreplace(input17,' ','',[rfReplaceAll]);
output18:=stringreplace(input18,' ','',[rfReplaceAll]);
output19:=stringreplace(input19,' ','',[rfReplaceAll]);
output20:=stringreplace(input20,' ','',[rfReplaceAll]);
output21:=stringreplace(input21,' ','',[rfReplaceAll]);
output22:=stringreplace(input22,' ','',[rfReplaceAll]);
output23:=stringreplace(input23,' ','',[rfReplaceAll]);
output24:=stringreplace(input24,' ','',[rfReplaceAll]);
output25:=stringreplace(input25,' ','',[rfReplaceAll]);


with Query1 do
begin
close;
//sql.Clear;
//sql.Add('insert into "mydata.db" mydata');
//sql.Add('values(:序号,:发卡行代号,:交易帐号,:收单行代号,:系统参考号,:交易发生日,:交易时间,:POS交易流水,:交易金额,:回扣率,:调整系统参考,:交易类型码,:处理码,:POS机代码,:商户代号,:商户帐号,:交易币别,:清算金额,:人工授权标志,:GNET代授权记号,:清算日,:交易授权码,:POS交易时间,:POS交易日期,:业别代码)');
ParamByName('序号').asstring:=output1;
ParamByName('发卡行代号').asstring:=output2;
ParamByName('交易帐号').asstring:=output3;
ParamByName('收单行代号').asstring:=output4;
ParamByName('系统参考号').asstring:=output5;
ParamByName('交易发生日').asstring:=output6;
ParamByName('交易时间').asstring:=output7;
ParamByName('POS交易流水').asstring:=output8;
ParamByName('交易金额').asstring:=output9;
ParamByName('回扣率').asstring:=output10;
ParamByName('调整系统参考').asstring:=output11;
ParamByName('交易类型码').asstring:=output12;
ParamByName('处理码').asstring:=output13;
ParamByName('POS机代号').asstring:=output14;
ParamByName('商户代号').asstring:=output15;
ParamByName('商户帐号').asstring:=output16;
ParamByName('交易币别').asstring:=output17;
ParamByName('清算金额').asstring:=output18;
ParamByName('人工授权标志').asstring:=output19;
ParamByName('GNET代授权记号').asstring:=output20;
ParamByName('清算日').asstring:=output21;
ParamByName('交易授权码').asstring:=output22;
ParamByName('POS交易时间').asstring:=output23;
ParamByName('POS交易日期').asstring:=output24;
ParamByName('业别代码').asstring:=output25;
ExecSQl;
end;
end;

//检查db.db 表中是否有重复的记录,如有提示错误
procedure TForm1.ChkPost(PostField:string);
begin
Query1.Close;
Query1.SQl.Clear;
Query1.SQl.Add('select 文件名 from "db.db" db where 文件名=:文件名');
Query1.Prepare;
Query1.Open;
if Query1.ParamByName('文件名').asstring = PostField then
begin
ShowMessage('数据库中已存在该文件的记录!请重新输入');
abort;
end;
end;


procedure TForm1.O1Click(Sender: TObject);
var
TxtFileName:TextFile;
StrFileName,Str:String;
temp:TStringList;
n,i,Len,s,x,Num:integer;
begin
with OpenDialog1 do
begin

Filter:='文本文件(*.txt)¦*.txt¦所有文件(*.*)¦*.*';
InitialDir:=ExtractFilePath(Application.ExeName);
Title:='选择文件';
if Execute then
begin
StrFileName:=OpenDialog1.FileName;
//用 ExtractFileName(StrFileName) 取得打开文件的名 x.txt,用于将文件名插入数据库
ChkFileName:=ExtractFileName(StrFileName);
ChkPost(ChkFileName);
begin
//将文件名插入到db.db表
with Query1 do
begin
close;
sql.Clear;
sql.Add('insert into "db.db"(文件名)');
sql.Add('values(:文件名)');
ParamByName('文件名').asstring:=ChkFileName;
ExecSQl;
end;
//可以用另外的方法先将字符格式化,成为连续的字符串
begin
temp:= TStringList.Create;
try
temp.LoadFromFile(StrFileName);
n:=0;
for i:=0 to temp.count-1 do
begin
n:=n+Length(temp);
end;
n:=Length(Trim(temp.Text))-(temp.Count - 1)*2;
finally
temp.Free;
Len:=n div 188;
s:=n mod 188;
if s=0 then
Num:=Len-2
else
Num:=Len-1;
end;
end;
AssignFile(TxtFileName,StrFileName);
Reset(TxtFileName);
readln(TxtFileName,Str);
ReadHead(Str);
for x:=1 to Num do
begin
readln(TxtFileName,Str);
HandleStr(Str);
InsertName(ChkFileName);
end;
readln(TxtFileName,Str);
ReadEnd(Str);
CloseFile(TxtFileName);
end;
end;
end;
end;

procedure TForm1.X2Click(Sender: TObject);
begin
halt;
end;

//读首记录并插入db.db表
procedure TForm1.ReadHead(Str:string);
var
HeadStr1,HeadStr2:string;
begin
HeadStr1:=Copy(Str,7,6);
HeadStr2:=Copy(Str,32,6);
//Temp:= Strtoint(读出来的字符串) 用来将字符型变量转换成整型

with Query1 do
begin
close;
SQL.Clear;
SQL.Add('update "db.db" set 首记录发卡行代号=:首记录发卡行代号, 首记录收单行代号=:首记录收单行代号 where 文件名='+''''+ChkFileName+'''');
ParamByName('首记录发卡行代号').asstring:=HeadStr1;
ParamByName('首记录收单行代号').asstring:=HeadStr2;
ExecSQL;
end;
end;

//插入文件名到mydata.db作为与db.db的关联
procedure TForm1.InsertName(fieldname:string);
begin
with Query1 do
begin
close;
SQL.Clear;
SQL.Add('update "mydata.db" set 文件名=:文件名');
ParamByName('文件名').asstring:=fieldname;
ExecSQL;
end;
end;

//读尾记录,插入db.db表
procedure TForm1.ReadEnd(Str:string);
var
EndStr1,EndStr2:string;
begin
EndStr1:=Copy(Str,70,12);
EndStr2:=Copy(Str,169,5);

with Query1 do
begin
close;
SQL.Clear;
SQl.Add('update "db.db" set 尾记录交易总金额=:尾记录交易总金额, 尾记录交易总笔数=:尾记录交易总笔数 where 文件名='+''''+ChkFileName+'''');
ParamByName('尾记录交易总金额').asstring:=EndStr1;
ParamByName('尾记录交易总笔数').asstring:=EndStr2;
ExecSQl;
end;
end;
procedure TForm1.P1Click(Sender: TObject);
begin
Form3.show;
end;

end.
 
//检查db.db 表中是否有重复的记录,如有提示错误
procedure TForm1.ChkPost(PostField:string);
begin
Query1.Close;
Query1.SQl.Clear;
Query1.SQl.Add('select 文件名 from "db.db" db where 文件名=:文件名');
Query1.Prepare;
Query1.Params[0].DataType := ftString; //增加的部分, 其余参照修改
Query1.Open;
if Query1.ParamByName('文件名').asstring = PostField then
begin
ShowMessage('数据库中已存在该文件的记录!请重新输入');
abort;
end;
end;
 
将程序修改了一些地方,但运行还是有错提示“list index out of bounds (2)”
查看数据库db.db中'文件名'字段,'首记录发卡行代号'字段 和 '首记录收单行代号'字段存在正常的记录(就是说这3个字段的数据库操作是成功的)。
但db.db的其他字段,和mydata.db中的所有字段都是空的,没有理想中插入的记录,请问程序还有哪些地方修改?
mydata.db是以一个自动增加数值字段为索引,db.db是以'文件名'字段为索引,同时这个字段也是跟mydata.db关联的字段(mydata.db中也有'文件名'这个字段)

unit check;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, XPMenu, Grids, DBGrids, DB, DBTables;

type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
XPMenu1: TXPMenu;
F1: TMenuItem;
O1: TMenuItem;
P1: TMenuItem;
X1: TMenuItem;
E1: TMenuItem;
H1: TMenuItem;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
OpenDialog1: TOpenDialog;
X2: TMenuItem;
Query1: TQuery;
procedure HandleStr(Str:string);
procedure ChkPost(PostField:string);
procedure O1Click(Sender: TObject);
procedure X2Click(Sender: TObject);
procedure ReadHead(Str:string);
procedure ReadEnd(Str:string);
procedure InsertName(fieldname:string);
procedure P1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
ChkFileName:string;

implementation

uses printset;

{$R *.dfm}

procedure TForm1.HandleStr(Str:string);
var
input1,input2,input3,input4,input5,input6,input7,input8,input9,input10:string;
input11,input12,input13,input14,input15,input16,input17,input18,input19,input20:string;
input21,input22,input23,input24,input25:string;
output1,output2,output3,output4,output5,output6,output7,output8,output9,output10:string;
output11,output12,output13,output14,output15,output16,output17,output18,output19,output20:string;
output21,output22,output23,output24,output25:string;

NewStr:string;

begin
input1:=Copy(Str,1,6);
input2:=Copy(Str,7,6);
input3:=Copy(Str,13,19);
input4:=Copy(Str,32,6);
input5:=Copy(Str,38,12);
input6:=Copy(Str,50,6);
input7:=Copy(Str,56,8);
input8:=Copy(Str,64,6);
input9:=Copy(Str,70,12);
input10:=Copy(Str,82,4);
input11:=Copy(Str,86,12);
input12:=Copy(Str,98,2);
input13:=Copy(Str,100,6);
input14:=Copy(Str,106,8);
input15:=Copy(Str,114,15);
input16:=Copy(Str,129,19);
input17:=Copy(Str,148,3);
input18:=Copy(Str,151,12);
input19:=Copy(Str,163,1);
input20:=Copy(Str,164,1);
input21:=Copy(Str,165,4);
input22:=Copy(Str,169,6);
input23:=Copy(Str,175,6);
input24:=Copy(Str,181,4);
input25:=Copy(Str,185,4);

NewStr:=input1+input2+input3+input4+input5+input6+input7+input8+input9+input10
+input11+input12+input13+input14+input15+input16+input17+input18+input19+input20
+input21+input22+input23+input24+input25;

if Length(NewStr)<>188 then
begin
ShowMessage('源文件格式不符合要求,请校对!');
abort;
end;

output1:=stringreplace(input1,' ','',[rfReplaceAll]);
output2:=stringreplace(input2,' ','',[rfReplaceAll]);
output3:=stringreplace(input3,' ','',[rfReplaceAll]);
output4:=stringreplace(input4,' ','',[rfReplaceAll]);
output5:=stringreplace(input5,' ','',[rfReplaceAll]);
output6:=stringreplace(input6,' ','',[rfReplaceAll]);
output7:=stringreplace(input7,' ','',[rfReplaceAll]);
output8:=stringreplace(input8,' ','',[rfReplaceAll]);
output9:=stringreplace(input9,' ','',[rfReplaceAll]);
output10:=stringreplace(input10,' ','',[rfReplaceAll]);
output11:=stringreplace(input11,' ','',[rfReplaceAll]);
output12:=stringreplace(input12,' ','',[rfReplaceAll]);
output13:=stringreplace(input13,' ','',[rfReplaceAll]);
output14:=stringreplace(input14,' ','',[rfReplaceAll]);
output15:=stringreplace(input15,' ','',[rfReplaceAll]);
output16:=stringreplace(input16,' ','',[rfReplaceAll]);
output17:=stringreplace(input17,' ','',[rfReplaceAll]);
output18:=stringreplace(input18,' ','',[rfReplaceAll]);
output19:=stringreplace(input19,' ','',[rfReplaceAll]);
output20:=stringreplace(input20,' ','',[rfReplaceAll]);
output21:=stringreplace(input21,' ','',[rfReplaceAll]);
output22:=stringreplace(input22,' ','',[rfReplaceAll]);
output23:=stringreplace(input23,' ','',[rfReplaceAll]);
output24:=stringreplace(input24,' ','',[rfReplaceAll]);
output25:=stringreplace(input25,' ','',[rfReplaceAll]);


with Query1 do
begin
close;
sql.Clear;
sql.Add('insert into "mydata.db" mydata (序号,发卡行代号,交易帐号,收单行代号,系统参考号,交易发生日,交易时间,POS交易流水,交易金额,回扣率,调整系统参考,交易类型码,处理码,POS机代码,商户代号,商户帐号,交易币别,清算金额,人工授权标志,GNET代授权记号,清算日,交易授权码,POS交易时间,POS交易日期,业别代码) ');
sql.Add('values(:序号,:发卡行代号,:交易帐号,:收单行代号,:系统参考号,:交易发生日,:交易时间,:POS交易流水,:交易金额,:回扣率,:调整系统参考,:交易类型码,:处理码,:POS机代码,:商户代号,:商户帐号,:交易币别,:清算金额,:人工授权标志,:GNET代授权记号,:清算日,:交易授权码,:POS交易时间,:POS交易日期,:业别代码)');
params[0].asstring:=output1;
params[1].asstring:=output2;
params[2].asstring:=output3;
params[3].asstring:=output4;
params[4].asstring:=output5;
params[5].asstring:=output6;
params[6].asstring:=output7;
params[7].asstring:=output8;
params[8].asstring:=output9;
params[9].asstring:=output10;
params[10].asstring:=output11;
params[11].asstring:=output12;
params[12].asstring:=output13;
params[13].asstring:=output14;
params[14].asstring:=output15;
params[15].asstring:=output16;
params[16].asstring:=output17;
params[17].asstring:=output18;
params[18].asstring:=output19;
params[19].asstring:=output20;
params[20].asstring:=output21;
params[21].asstring:=output22;
params[22].asstring:=output23;
params[23].asstring:=output24;
params[24].asstring:=output25;
ExecSQl;
end;
end;

procedure TForm1.ChkPost(PostField:string);
begin
Query1.Close;
Query1.SQl.Clear;
Query1.SQl.Add('select 文件名 from "db.db" db GROUP BY 文件名');
Query1.Prepare;
Query1.Open;
if Query1.ParamByName('文件名').asstring <> PostField then
begin
ShowMessage('数据库中已存在该文件的记录!请重新输入');
abort;
end;
end;

procedure TForm1.O1Click(Sender: TObject);
var
TxtFileName:TextFile;
StrFileName,Str:String;
temp:TStringList;
n,i,Len,s,x,Num:integer;
begin
with OpenDialog1 do
begin

Filter:='文本文件(*.txt)¦*.txt¦所有文件(*.*)¦*.*';
InitialDir:=ExtractFilePath(Application.ExeName);
Title:='选择文件';
if Execute then
begin
StrFileName:=OpenDialog1.FileName;
//用 ExtractFileName(StrFileName) 取得打开文件的名 x.txt,用于将文件名插入数据库
ChkFileName:=ExtractFileName(StrFileName);
//ChkPost(ChkFileName);
begin
with Query1 do
begin
close;
sql.Clear;
sql.Add('insert into "db.db" (文件名) ');
sql.Add('values(:文件名)');
ParamByName('文件名').asstring:=ChkFileName;
ExecSQl;
end;
//可以用另外的方法先将字符格式化,成为连续的字符串
begin
temp:= TStringList.Create;
try
temp.LoadFromFile(StrFileName);
n:=0;
for i:=0 to temp.count-1 do
begin
n:=n+Length(temp);
end;
n:=Length(Trim(temp.Text))-(temp.Count - 1)*2;
finally
temp.Free;
Len:=n div 188;
s:=n mod 188;
if s=0 then
Num:=Len-2
else
Num:=Len-1;
end;
end;
AssignFile(TxtFileName,StrFileName);
Reset(TxtFileName);
readln(TxtFileName,Str);
ReadHead(Str);
for x:=1 to Num do
begin
readln(TxtFileName,Str);
HandleStr(Str);
InsertName(ChkFileName);
end;
readln(TxtFileName,Str);
ReadEnd(Str);
CloseFile(TxtFileName);
end;
end;
end;
end;

procedure TForm1.X2Click(Sender: TObject);
begin
halt;
end;

procedure TForm1.ReadHead(Str:string);
var
HeadStr1,HeadStr2:string;
begin
HeadStr1:=Copy(Str,7,6);
HeadStr2:=Copy(Str,32,6);
//Temp:= Strtoint(读出来的字符串) 用来将字符型变量转换成整型

with Query1 do
begin
close;
SQL.Clear;
SQL.Add('update "db.db" set 首记录发卡行代号=:首记录发卡行代号,首记录收单行代号=:首记录收单行代号 where 文件名='+''''+ChkFileName+'''');
ParamByName('首记录发卡行代号').asstring:=HeadStr1;
ParamByName('首记录收单行代号').asstring:=HeadStr2;
ExecSQL;
end;
end;

procedure TForm1.InsertName(fieldname:string);
begin
with Query1 do
begin
close;
SQL.Clear;
SQL.Add('update "mydata.db" set 文件名='+''''+fieldname+''''+'');
ExecSQL;
end;
end;

procedure TForm1.ReadEnd(Str:string);
var
EndStr1,EndStr2:string;
begin
EndStr1:=Copy(Str,70,12);
EndStr2:=Copy(Str,169,5);

with Query1 do
begin
close;
SQL.Clear;
SQl.Add('update "db.db" set 尾记录交易总金额=:尾记录交易总金额, 尾记录交易总笔数=:尾记录交易总笔数 where 文件名='+''''+ChkFileName+''''+'');
ParamByName('尾记录交易总金额').asstring:=EndStr1;
ParamByName('尾记录交易总笔数').asstring:=EndStr2;
ExecSQl;
end;
end;

procedure TForm1.P1Click(Sender: TObject);
begin
Form3.show;
end;

end.
 
请高手帮忙
 
程序太长了,看不过来 :(
不过提一点个人意见:你定义那么多String类型的变量显然是不合适,建议改成数组。
另外,tseug说的:
Query1.Params[0].DataType := ftString; //增加的部分, 其余参照修改
应该是不需要的。
在select 语句中查询中文字段会不会有问题?我好象看过这方面的说法,但是不能确定。
 
各位大哥,请不要动不动就是一大堆的源代码。看得我、、看得我头都晕了,谢了!
 
请把你的“文件名”都改成 English
试试
 
好像Delphi 不支持 中文 的关键字
 
经过跟踪检测到是这里出了问题,错误提示“Query1:parameter ‘序号’not found”,但数据库中是有‘序号’这个字段的。请问代码哪里错了

with Query1 do
begin
close;
sql.Clear;
sql.Add('insert into "mydata.db" (序号,发卡行代号,交易帐号,收单行代号,系统参考号,交易发生日,交易时间,POS交易流水,交易金额,回扣率,调整系统参考,交易类型码,处理码,POS机代码,商户代号,商户帐号,交易币别,清算金额,人工授权标志,GNET代授权记号,清算日,交易授权码,POS交易时间,POS交易日期,业别代码) ');
sql.Add('values(:序号,:发卡行代号,:交易帐号,:收单行代号,:系统参考号,:交易发生日,:交易时间,:POS交易流水,:交易金额,:回扣率,:调整系统参考,:交易类型码,:处理码,:POS机代码,:商户代号,:商户帐号,:交易币别,:清算金额,:人工授权标志,:GNET代授权记号,:清算日,:交易授权码,:POS交易时间,:POS交易日期,:业别代码)');
params[0].asstring:=output1;
params[1].asstring:=output2;
params[2].asstring:=output3;
params[3].asstring:=output4;
params[4].asstring:=output5;
params[5].asstring:=output6;
params[6].asstring:=output7;
params[7].asstring:=output8;
params[8].asstring:=output9;
params[9].asstring:=output10;
params[10].asstring:=output11;
params[11].asstring:=output12;
params[12].asstring:=output13;
params[13].asstring:=output14;
params[14].asstring:=output15;
params[15].asstring:=output16;
params[16].asstring:=output17;
params[17].asstring:=output18;
params[18].asstring:=output19;
params[19].asstring:=output20;
params[20].asstring:=output21;
params[21].asstring:=output22;
params[22].asstring:=output23;
params[23].asstring:=output24;
params[24].asstring:=output25;
ExecSQl;
end;
 
你直接用Access的导入功能就能实现
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
928
SUNSTONE的Delphi笔记
S
后退
顶部