Y
yang_delp
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button6Click(Sender: TObject);
var
afile:TADOBlobStream;
myfile:TFileStream;
sql_str:string;
memsize:Integer;
bufferchar;
begin
with Query1 do
begin
if active then Close;
sql_str:=format('select * from %s where bianhao=''%s''', ['info_fabu', '1']);
SQL.Add(sql_str);
Open;
if Query1.IsEmpty then
begin
Query1.Insert ;
FieldByName('bianhao').AsString:='1';
FieldByName('biaoti').AsString:='aa';
end
else query1.edit;
afile:=TADOBlobStream.Create((Query1.Fieldbyname('info_memo') as TBlobField),bmWrite);
IF dlgOpen.Execute then
afile.LoadFromFile(dlgOpen.FileName);
query1.Post;
end;
afile.Free;
end;
create table info_fabu
(
bianhao varchar(5) not null,
biaoti varchar(40) null,
info_memo long binary,
primary key(bianhao)
);
var
afile:TADOBlobStream;
myfile:TFileStream;
sql_str:string;
memsize:Integer;
bufferchar;
begin
with Query1 do
begin
if active then Close;
sql_str:=format('select * from %s where bianhao=''%s''', ['info_fabu', '1']);
SQL.Add(sql_str);
Open;
if Query1.IsEmpty then
begin
Query1.Insert ;
FieldByName('bianhao').AsString:='1';
FieldByName('biaoti').AsString:='aa';
end
else query1.edit;
afile:=TADOBlobStream.Create((Query1.Fieldbyname('info_memo') as TBlobField),bmWrite);
IF dlgOpen.Execute then
afile.LoadFromFile(dlgOpen.FileName);
query1.Post;
end;
afile.Free;
end;
create table info_fabu
(
bianhao varchar(5) not null,
biaoti varchar(40) null,
info_memo long binary,
primary key(bianhao)
);