M
mengh
Unregistered / Unconfirmed
GUEST, unregistred user!
一段从文本文件(doc)中读数据存入表中的程序,问什么总是出错?
OpenDialog1.Execute;
tsfile:=tfilestream.create(OpenDialog1.FileName,fmopenreadwrite);
tsfile.seek(2,0);
tsfile.ReadBuffer(s,14);
query1.edit;
query1.append;
query1.fieldbyname('ISBN').asString:=s;
query1.REFRESH;
DBGRID1.REFRESH;
tsfile.free;
OpenDialog1.Execute;
tsfile:=tfilestream.create(OpenDialog1.FileName,fmopenreadwrite);
tsfile.seek(2,0);
tsfile.ReadBuffer(s,14);
query1.edit;
query1.append;
query1.fieldbyname('ISBN').asString:=s;
query1.REFRESH;
DBGRID1.REFRESH;
tsfile.free;