Subject RE: [IBO] Bitmap Image not Valid
Author Helen Borrie
At 12:20 AM 4/01/2003 -0500, you wrote:
>I can live with .bmp, no problem. The subtype is set to binary (0). Re:/
>tIboSql: sorry, I meant tIboQuery. Re:/ linkage, tDbImage.DataField is set
>to the name of the blob field of the FB table.
>In case it helps, the D6 debugger stops execution on the line,
>"FIB_Query.Name := 'IBOqr' + Name;", in IBODataset.pas.

No, it doesn't help a bit.

Just for a reality check, I did the following:

1. opened this database in IB_SQL:
dev:C:\Program Files\Common Files\Borland Shared\Data\mastsql.gdb

(dev is the host name of my development machine)

2. did this:

alter table parts
add pic blob sub_type 0

and committed it.

3. Created a new application in Delphi 6, dropped onto it a TIBODatabase,
a TIBOQuery, a TDatasource, two TDBEdits, a TDBImage and a TDBNavigator.

4. Pointed the Path to the database above, Server to 'dev', protocol to
cpTCP_IP. Added password and username, named it 'db' and connected it.

5. Set up IBOQuery1 with with the following statement:


Linked its DatabaseName prop to 'db'.

6. Linked up the TDatasource to the query, then linked all other controls'
Datasource property to that and set the Datafield props of the 2 dbedits
and the dbimage.

7. Added this code to the forms OnCreate event handler:

if not IBODatabase1.connected then
if not then;

8. Ran it, no errors.

9. While app was running, started Hypersnap (but any Windows graphics
program that supports bitmaps and clipboard would do...)

10. Opened a GIF graphic in Hypersnap, saved it as Windows bitmap, then
copied it to the clipboard.

11. Back in the application, clicked the Edit button on the TNavigator,
clicked into the TDBImage.

12. Ctrl-V to copy the image into the dbimage (it did) and clicked the
post button. Autocommit was true.

13. Proceeded to similarly drop bitmaps into several other Parts records.

14. Closed the app.

15. Restarted the app. All bitmaps previously added were present.

iow, rough-as-guts, but it all works as expected....