var
FStream : TFileStream;
file_name_to_base,fe:
string
;
fsize:
longint
;
kl_s:
string
;
op:
string
;
begin
adoconnection1
.
BeginTrans;
opendialog1
.
Execute;
file_name_to_base :=OpenDialog1
.
FileName ;
fe:= ExtractFileExt(OpenDialog1
.
FileName);
adocommand1
.
Parameters
.
Clear;
FStream := TFileStream
.
Create((file_name_to_base), fmOpenRead);
kl_s:=Edit2
.
Text;
op:=Memo1
.
Text;
adocommand1
.
CommandType:=cmdText ;
adocommand1
.
CommandText :=
'insert into "Ресурсы"("Название_ресурса","Формат","Ресурсы","Размер","Ключевые_слова","Описание") values('
+ quotedstr(file_name_to_base) +
','
+ quotedstr(fe) +
','
+
':BStr1'
+
','
+ inttostr(fstream
.
size) +
','
+ quotedstr(kl_s) +
','
+ quotedstr(op) +
')'
;
end
;
end
;