Monday, April 26, 2010

Using OLE Blob in Powerbuilder 10 using Oracle 10g

In datawindow, you might want to have OLE column that display such as picture of staff department.
These are the step to do it :-



1. When building datawindow select the ID number (in my case staff number) without selecting the blob / longraw (in Oracle 10g) column.
2. Make sure the table have primary key (staff id), and update properties for datawindow as below :-



3. Add an OLE column from menu Insert->Control->OLE Database Blob.
4. As below the properties for OLE column (select blob column from the same table)



5. Key Clause: [primary key for blob table = :primary key for update in datawindow] 
6. Client Name Expression : used when opening paintbrush application to update to which staff number such as below (after running your application)



7. Paintbrush appears when double-click on OLEblob column


8. You can paste a picture or select paste from file...
9. Update back to datawindow by clicking menu in paint such below, then exit paint.



10. When return to datawindow, you have blob picture in you application!
11. Remember to save you datawindow by using dw_1.update() then commit using sqlca;
or the picture will not be updated into your database.
12. This feature doesnt not supported by Appeon till now (version 6.2)

Friday, April 2, 2010

Black Cat Relaxing

This black cat was found resting at my mother's house. Black is beauty, you're really black uh..