Page 1 of 1

Cannot Focus a disable or invaiible windows

Posted: 27.09.2005, 07:50
by iarthur.ora
For Example : Form 1 's button method , call dm's query
----------------------------------------------------------------------

[syntax="delphi"] with dmdbConnPool do begin
with Q_EMPLOYEE do begin
JPG.Assign(Image1.Picture.Graphic);
JPG.SaveToStream(MS);
MS.Position:=0;
EDIT;
TBlobField(FieldbyName('PHOTO')).LoadFromStream(MS);
Post; // When I post, Error Message occour
// Cannot Focus a disable or invaiible windows
exit;
end;
end;[/syntax]
----------------------------------------------------------

I have second question, while i use sql to save jpg image to mysql database, always get half of image or less than half image which compare with orginal. However, If I use bitmap, the whole image can save.

Thank you your much for any help.

[edit="Michael"]I put your sourcecode into syntax-tags - looks better now :wink:[/edit]

Posted: 27.09.2005, 16:40
by iarthur.ora
Forget Something,
Q_Employee is a TZQuery , Not a Table.

Is it possible to use post at TZQuery???