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

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

Postby dutch » Thu May 21, 2020 2:03 pm

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
dutch
 
Posts: 1545
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby nageswaragunupudi » Fri May 22, 2020 2:25 am

Yes.

Code: Select all  Expand view  RUN
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
nageswaragunupudi
 
Posts: 10659
Joined: Sun Nov 19, 2006 5:22 am
Location: India

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

Postby dutch » Fri May 22, 2020 10:07 am

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)
User avatar
dutch
 
Posts: 1545
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests