Page 4 of 4
Re: PostgreSql Libs not ready yet ?
Posted: Mon Aug 29, 2022 8:03 pm
by AUGE_OHR
hi Mol,
mol wrote: ↑Mon Aug 29, 2022 7:31 pm
Where can I find
cBin2Hex function?
sorry i made a Mistake as it is a Ot4Xb Funtion for Xbase++ ...
but i "think" HB_STRTOHEX() is the same line cBin2Hex()
Code: Select all
// c:\hmg.3.4.4\HARBOUR\include\hbcompat.ch
#xtranslate hb_HexToStr([<c,...>]) => HexToStr(<c>)
#xtranslate hb_StrToHex([<c,...>]) => StrToHex(<c>)
Re: PostgreSql Libs not ready yet ?
Posted: Mon Aug 29, 2022 9:34 pm
by mol
It's strange that pg functions do conversion on the fly.
Is anybody serious working with Postgresql?
I'm using newest version
Re: PostgreSql Libs not ready yet ?
Posted: Tue Aug 30, 2022 1:17 am
by AUGE_OHR
hi Mol,
as i say i use libPQ.DLL "native" under Xbase++ so i have my "own" PGSQL CLASS
as it is "pure" CLASS Code it will also work under harbour
but it need "Import" LIB.A ...
---
i have work with TPQServer() to "import" DBF into PostgreSQL Table
it does all what is need to "import" ... but my "native" CLASS have "more"
i have begin to make harbour Sample hbPGU where you can "testdrive" "import"

- HBPGU_020.JPG (459.49 KiB) Viewed 752 times
as Work is NOT finish yet i have not release hbPGU and Source, here "beta" Version 0.20
---
i use PostgreSQL Server v14 "without " SSL so i need "only" LIBPQ.DLL from Version v14
! Note : since v9.x it need "more" *.DLL like ssleay32.dll even when not used
using PostgreSQL Server v14 you even can use libPQ.DLL v7.5x as kit have all (except SSL etc) on Client Side
new Function are on Server Side where you use Query when have made "connection" via libPQ.DLL
Re: PostgreSql Libs not ready yet ?
Posted: Tue Aug 30, 2022 8:01 am
by mol
I've got a little success.
I've created database with encoding WIN1250 and table with content_field as VARCHAR type.
After that, using hb_base64encode I placed my .pdf or .jpg file into table with success.
Using hb_base64decode I wrote content of field to a local file and it is the same as origin.
With default UTF-8 I'm getting error while putting content of file to database.