PostgreSql Libs not ready yet ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: PostgreSql Libs not ready yet ?

Post 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>)
have fun
Jimmy
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: PostgreSql Libs not ready yet ?

Post by mol »

It's strange that pg functions do conversion on the fly.
Is anybody serious working with Postgresql?
I'm using newest version
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: PostgreSql Libs not ready yet ?

Post 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
HBPGU_020.JPG (459.49 KiB) Viewed 753 times
as Work is NOT finish yet i have not release hbPGU and Source, here "beta" Version 0.20
HBPGU_20.zip
(2.08 MiB) Downloaded 87 times
---

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
have fun
Jimmy
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: PostgreSql Libs not ready yet ?

Post 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.
Post Reply