Does BTNBMP is supporting Image from BLOB field (MySql)?

Post Reply
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Does BTNBMP is supporting Image from BLOB field (MySql)?

Post by dutch »

Dear All,

I need to use BTNBMP and show the picture (contain in BLOB field MySql).

How do I make it?

Thanks in advance,
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Does BTNBMP is supporting Image from BLOB field (MySql)?

Post by nageswaragunupudi »

Yes.

Code: Select all

function BtnBmpBlob()

   local oCn
   local oDlg, oBtn, oFont
   local cBlobTaj, cBlobNia

   oCn   := FW_DemoDB()

   cBlobTaj := oCn:QueryResult( "SELECT image FROM wwonders WHERE id = 8" )
   cBlobNia := oCn:QueryResult( "SELECT image FROM wwonders WHERE id = 9" )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-20
   DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont ;
      TITLE "BTNBMP FROM BLOB"

   @ 20,20 BTNBMP oBtn PROMPT "TajMahal" ;
      RESOURCE cBlobTaj SIZE 150,150 PIXEL OF oDlg 2007 ;
      ACTION MsgInfo( "From Blob in MySql" )

   @ 20,200 BTNBMP oBtn PROMPT "Niagara" ;
      RESOURCE cBlobNia SIZE 150,150 PIXEL OF oDlg 2007 ;
      ACTION MsgInfo( "From Blob in MySql" )

   @ 200,20 BUTTON "CLOSE" SIZE 100,40 PIXEL OF oDlg

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

   oCn:Close()

return nil
 
Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Does BTNBMP is supporting Image from BLOB field (MySql)?

Post by dutch »

Dear Master Rao,

Thank you so much, it work very well as expect.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Post Reply