Fórum Gravação de fotos no interbase..... #140202
24/02/2003
0
agora preciso gravar essas fotos antigas no bd, fiz a rotina e ateh aih td bem, nenhum erro de sintaxe, porem qdo chega em um registro q ainda nao tem a foto no campo blob, no applyupdates dah o seguinte erro:
Table Unknown + (nome da tabela)
o q pode ser isso?
estou usando a seguinte rotina:
with Tabela do
begin
if (State in [dsInactive]) then
Open;
if not (State in [dsInsert, dsEdit]) then
Edit;
FileStream:=TFileStream.Create(Arquivo, fmOpenRead or fmShareDenyWrite);
(Tabela.FieldByName(´Foto´) as TBlobField).LoadFromStream(FileStream);
try
Post;
finally
FileStream.Free;
end;
end;
obrigada,
K-ROL
K-rol
Curtir tópico
+ 0Posts
24/02/2003
Anonymous
Gostei + 0
24/02/2003
K-rol
Gostei + 0
24/02/2003
Anonymous
BMP : TBitmap;
begin
BMP := TBitmap.Create;
try
BMP.LoadFromFile( Arquivo );
if not ( Table1.State in [ dsEdit, dsInsert ] ) then
Table1.Edit;
Table1.FieldByName( ´Foto´ ).Assign( BMP )
finally
BMP.Free;
end;
end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)