xBrowse jpg in SQL-database

Re: xBrowse jpg in SQL-database

Postby nageswaragunupudi » Fri Nov 08, 2019 6:52 am

Code: Select all  Expand view

"0x" + STRTOHEX( MEMOREAD( ... ) )
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10335
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse jpg in SQL-database

Postby nageswaragunupudi » Fri Nov 08, 2019 6:58 am

Still, we advise you to adopt the approach and syntax advised by us in our samples above. They are safe and work with any database. You will not be wasting your time in searching for solutions like this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10335
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse jpg in SQL-database

Postby cdmmaui » Fri Nov 08, 2019 4:08 pm

Thanks Rao, that seemed to solve the problem. If I run in to any issues, I will contact you.
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: xBrowse jpg in SQL-database

Postby Jack » Thu Nov 14, 2019 3:54 pm

Hi,
Is it the same with DOCX or XLSX or PDF ?

What is the instruction to read the file saved in a sql table and display it with WORD or Excel or PDF Viewer ?

Should we read from the blob field, save it to the disk with MEMOWRITE or FWRITE and the open the files ?

Thanks for your help .

Philippe .
Jack
 
Posts: 282
Joined: Wed Jul 11, 2007 11:06 am

Re: xBrowse jpg in SQL-database

Postby nageswaragunupudi » Fri Nov 15, 2019 4:33 am

We need to first write them to a temporary file on the disk and then open the file with appropriate application.

Writing to disk:
Code: Select all  Expand view

// xharbour
MEMOWRIT( cFilename, oRs:Fields( "fieldname" ):Value, .f. ) // ADO
//or
MEMOWRIT( cFileName, oRs:fieldname, .f. ) // FWMARIADB library

// or both harbour and xharbour
HB_MEMOWRIT( cFileName, oRs:Fields( "fieldname" ):Value ) // ADO
// OR
HB_MEMOWRIT( cFileName, oRs:FieldName )
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10335
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests

cron