build Import LIB from LibPQ.DLL

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Fri Jun 30, 2023 9:59 pm

Jimmy wrote:hi,

yes ,,, but only using (old v9) 32 Bit LibPQ.DLL Interface

i want to use 64 Bit App so i need 64 Bit LibPQ.DLL / LibPQ.LIB
it would be nice if Fivewin 64 Bit Version include "external" 64 Bit LIBs like in 32 bit Version


We are going to provide soon.
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Sun Jul 02, 2023 10:17 pm

hi,
nageswaragunupudi wrote:We already have programs to use PostGre in our samples which use some extensions created by FWH already

you mean c:\fwh\samples\testpgre.prg, based on TPQServer from hbPSQL.LIB, and those FWPG_* Function :?:

my Problem : Sample crash
Error description: Error BASE/1004 Message not found: TXBROWSE:NDATADEC

Stack Calls
===========
Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:NDATADEC( 11834 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SETPOSTGRECOL( 7191 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SETPOSTGRE( 7134 )
Called from: .\source\classes\XBROWSE.PRG => XBRWSETDATASOURCE( 17832 )
Called from: .\source\function\XBROWSER.PRG => XBROWSE( 144 )
Called from: .\HBPGU.PRG => SHOWTABLE( 226 )


p.s. i have try different Table but all crash

---

next "Problem" when try to open BIG Table
Image
as Table was open without LIMIT
Code: Select all  Expand view
  oRs   := oServer:Query( "select * from " + cTable )

it does create a BIG "Result" ... too much for 32 Bit OS

---

now i have build 64 Bit LIB so it would be not Problem without LIMIT ... but it "can" take a long Time
i can´t say how XBROWSE will run as i got the Error above
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Mon Jul 03, 2023 4:56 am

We regret that there is one small bug while setting up postgrecol inside xbrowse.
Kindly fix this. I think no one reported till now due to lack of postgre users.
I noticed the bug a few days back when I was testing postgre samples.
From now, we will pay equal attention to postgre support. It is really a wonderful RDBMS

This is the bugfix:
In xbrowse.prg, inside the method SetPostGreCol(...) please locate this line:
Code: Select all  Expand view
           :cFooterPicture   := NumPict( :nDataLen + 2, ::nDataDec )

Please change it as
Code: Select all  Expand view
           :cFooterPicture   := NumPict( :nDataLen + 2, :nDataDec )
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Mon Jul 03, 2023 5:04 am

After this fix, running fwh\samples\pgre01.prg:
Image
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Mon Jul 03, 2023 9:39 pm

hi,

thx for Answer
nageswaragunupudi wrote:I think no one reported till now due to lack of postgre users.

as Xbase++ use Postgre there might be "more" User how want to use Postgre

nageswaragunupudi wrote:This is the bugfix:
In xbrowse.prg, inside the method SetPostGreCol(...) please locate this line:
Code: Select all  Expand view
           :cFooterPicture   := NumPict( :nDataLen + 2, ::nDataDec )

Please change it as
Code: Select all  Expand view
           :cFooterPicture   := NumPict( :nDataLen + 2, :nDataDec )

i can "see" what you mean, but "how" to "rebuild" LIB :?:

... or can i "just" override METHOD SetPostGreCol( ... ) CLASS TXBrowse

Question : is XBROWSE "hardcode" ( IsKindOf() ) in Source :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Tue Jul 04, 2023 4:53 am

i can "see" what you mean, but "how" to "rebuild" LIB :?:

Easier way is:
Keep the modified xbrowse.prg in a separate folder.
Include this modified xbrowse.prg in your project link script as one of your source files.

I advise you to download and use the latest FWH2304.
In that case, we can send revised libs to you depending on your requirements so that your development will not stop.
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Tue Jul 04, 2023 4:56 am

Question : is XBROWSE "hardcode" ( IsKindOf() ) in Source

To be honest, I did not understand the question.

IsKindOf is a method that is available to all Harbour classes.
oObj:IsKindOf( "someclass" ) means the oObj is of class "someclass" or is derived from that class.
What is has to do with "hardcode" ?
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Tue Jul 04, 2023 4:57 am

... or can i "just" override METHOD SetPostGreCol( ... ) CLASS TXBrowse

Can do this also.
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Wed Jul 05, 2023 12:41 am

hi
nageswaragunupudi wrote:
i can "see" what you mean, but "how" to "rebuild" LIB :?:

Easier way is:
Keep the modified xbrowse.prg in a separate folder.
Include this modified xbrowse.prg in your project link script as one of your source files.

that i did now, thx

nageswaragunupudi wrote:
... or can i "just" override METHOD SetPostGreCol( ... ) CLASS TXBrowse

Can do this also.

can you please show some CODE "how" to begin
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Tue Jul 11, 2023 9:49 pm

hi,
nageswaragunupudi wrote:After this fix, running fwh\samples\pgre01.prg:

i have "import" Customer.DBF into PostgreSQL and can XBROWSER it
when "dblclick" to "edit" and want "save" it i got this Error Message
Image
but it is "wrong" :
Code: Select all  Expand view
... SET married = `Homer 2` WHERE id = Springfield

it must be
Code: Select all  Expand view
... SET first = `Homer 2` WHERE id = 1


---

when using sample pgre01.prg and "edit" the "Name" and "save" it,
Image
than Field "Image" change to what i have type as "Name"
Image

---

Question : "where" do i find CODE for "Update" :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Wed Jul 12, 2023 7:02 am

Question : "where" do i find CODE for "Update" :?:

TDataRow class

Anyway we are going to look into the issue and get back to you
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby nageswaragunupudi » Wed Jul 12, 2023 1:47 pm

When we tried here, it is working well.
Image
Regards

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

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Thu Jul 13, 2023 10:03 pm

hi
nageswaragunupudi wrote:When we tried here, it is working well.

interesting ...
which PostgreSQL Server Version are you using :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Thu Jul 13, 2023 11:31 pm

hi,

i have try again to build PGRE01.EXE
but it crash with
Error description: Error BASE/1004 Message not found: TXBROWSE:NDATADEC

ok, that is still "old" LIB while i do not know how to build new LIB ...

---

so i copy xbrowse.prg into \Sample, modify it and made PGRE01.MAK
Code: Select all  Expand view
HBDIR=c:\harbour
BCDIR=c:\BCC7
FWDIR=c:\fwh

#change these paths as needed
.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include;$(BCDIR)\include\windows
.path.C   = .\
.path.rc  = .\

#important: Use Uppercase for filenames extensions, in the next two rules!

PRG = \
PGRE01.PRG \
XBROWSE.PRG

PROJECT    : PGRE01.EXE

PGRE01.EXE  : $(PRG:.PRG=.OBJ) PGRE01.RES
   @echo off
   echo $(BCDIR)\lib\c0w32.obj + > b32.bc
   echo obj\PGRE01.obj obj\XBROWSE.obj , + >> b32.bc
   echo PGRE01.EXE, + >> b32.bc
   echo PGRE01.MAP, + >> b32.bc
   echo $(FWDIR)\lib\FiveH.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrtl.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbvmmt.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hblang.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmacro.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbrdd.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddntx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\rddfpt.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbdebug.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcommon.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpp.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbwin.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcpage.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbct.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbpcre.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcplr.lib + >> b32.bc
   echo $(HBDIR)\lib\win\bcc\xhb.lib + >> b32.bc

   echo $(HBDIR)\lib\win\bcc\hbziparc.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbmzip.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbzlib.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\minizip.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\png.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbusrrdd.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbtip.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbzebra.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbcurl.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\libcurl.lib +  >> b32.bc
   echo $(HBDIR)\lib\win\bcc\hbxpp.lib +  >> b32.bc

   echo $(FWDIR)\lib\dolphin.lib +  >> b32.bc
   echo $(FWDIR)\lib\hbpgsql.lib +  >> b32.bc
   echo $(FWDIR)\lib\libpq.lib +  >> b32.bc

   echo $(BCDIR)\lib\cw32mt.lib + >> b32.bc
   echo $(BCDIR)\lib\uuid.lib + >> b32.bc
   echo $(BCDIR)\lib\ws2_32.lib +  >> b32.bc
   echo $(BCDIR)\lib\psdk\gdiplus.lib +  >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\msimg32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\psapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\shell32.lib,  >> b32.bc

   IF EXIST PGRE01.res echo PGRE01.res >> b32.bc
   $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include;$(BCDIR)\include\windows

  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

PGRE01.RES : PGRE01.RC
  $(BCDIR)\bin\brc32.exe -r PGRE01.RC

i try "same Way" as you have show but my Result IS still bad :cry:
Image

p.s. this is 32 Bit Version
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: build Import LIB from LibPQ.DLL

Postby Jimmy » Tue Jul 18, 2023 9:28 pm

hi,

i have now try Sample with FWH 23/04 but still got same Problem

i wonder as i can "see" your Sample is working like my "native" Version
but why is Sample fwh\samples\pgre01.prg:not working on my PC ... :(

so i like to ask again : which PostgreSQl Server do you use :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

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