Author | Topic: Error in PGDBE | |
---|---|---|
Jacob John | Error in PGDBE on Sat, 09 Mar 2019 12:56:57 +0530 Hi, I was trying PGDBE. Please find the folowing code. This code took from the xBase 2.0 documentation. I removed the SELECT command added the code between the dot lines. PostgresSQL DBE header file is required #include "pgdbe.ch" PROCEDURE Main LOCAL cConnect LOCAL oSession Load the PostgreSQL DatabaseEngine IF(!DbeLoad("pgdbe")) Alert( "Unable to load the PostgreSQL DatabaseEngine", {"Quit"} ) QUIT ENDIF Establish the connection cConnect := "DBE=pgdbe;SERVER=DDPLSVR;DB=bkcb9;UID=postgres;PWD=ddpl@2019" oSession := DacSession():New( cConnect ) Check for connection success IF .NOT. oSession:isConnected() ? oSession:GetLastMessage() Alert( "Unable to establish connection to server", {"Quit"} ) QUIT ENDIF DbeSetDefault("PGDBE") Perform simple select and browse the result set *------------------------------------------------------------------------------------ aTables:={} USE empmstb9 Alias "X0" SELE X0 ; X0->(DbSetOrder(2)) SET FILTER TO Left(X0->Code,4)=="AQEC" SELE X0 ; X0->(DbSetOrder(2)) X0->(DbGoTop()) * DO WHILE (! X0->(Eof())) aAdd(aTables,{ X0->Code,AllTrim(X0->Name),X0->Trade}) X0->(DbSkip()) ENDDO *----------------------------------------------------------------------------------- SELECT * FROM empmstb9 VIA (oSession) * Browse() Disconnect from server oSession:disconnect() RETURN I am getting the following Error. If we remove the SET FILTER command, this will work properly. What could be the reason ? ------------------------------------------------------------------------------ ERROR LOG of "C:\Users\Kiran\Documents\Xbase++\projects\Postgres\Postgres.exe" Date: 03/09/2019 12:39:10 Xbase++ version : Xbase++ (R) Version 2.00.1079 Operating system : Windows 10 1803 Build 17134 ------------------------------------------------------------------------------ oError:args : -> NIL oError:canDefault : N oError:canRetry : Y oError:canSubstitute: N oError:cargo : NIL oError:description : Unknown variable oError:filename : oError:genCode : 22 oError:operation : aTables oError:osCode : 0 oError:severity : 2 oError:subCode : 2000 oError:subSystem : BASE oError:thread : 1 oError:tries : 1 ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Called from MAIN(33) Regards Kiron | |
Jacob John | Re: Error in PGDBE on Sat, 09 Mar 2019 13:02:02 +0530 Hi, Sorry. I am getting the following error. Please ignore the error message the last post ------------------------------------------------------------------------------ ERROR LOG of "C:\Users\Kiran\Documents\Xbase++\projects\Postgres\Postgres.exe" Date: 03/09/2019 12:59:33 Xbase++ version : Xbase++ (R) Version 2.00.1079 Operating system : Windows 10 1803 Build 17134 ------------------------------------------------------------------------------ oError:args : oError:canDefault : Y oError:canRetry : N oError:canSubstitute: N oError:cargo : NIL oError:description : Operating system error oError:filename : oError:genCode : 40 oError:operation : DbGoTop oError:osCode : 1 oError:severity : 2 oError:subCode : 4 oError:subSystem : BASE oError:thread : 1 oError:tries : 0 ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Called from MAIN(33) Regards Kiron On Sat, 09 Mar 2019 12:56:57 +0530, Jacob John wrote: >Hi, > > >I was trying PGDBE. Please find the folowing code. This code took from >the xBase 2.0 documentation. I removed the SELECT command added the >code between the dot lines. > > >// PostgresSQL DBE header file is required >#include "pgdbe.ch" > >PROCEDURE Main > LOCAL cConnect > LOCAL oSession > > Load the PostgreSQL DatabaseEngine > IF(!DbeLoad("pgdbe")) > Alert( "Unable to load the PostgreSQL DatabaseEngine", {"Quit"} ) > QUIT > ENDIF > > Establish the connection > cConnect := >"DBE=pgdbe;SERVER=DDPLSVR;DB=bkcb9;UID=postgres;PWD=ddpl@2019" > oSession := DacSession():New( cConnect ) > > Check for connection success > IF .NOT. oSession:isConnected() > ? oSession:GetLastMessage() > Alert( "Unable to establish connection to server", {"Quit"} ) > QUIT > ENDIF > DbeSetDefault("PGDBE") > Perform simple select and browse > the result set > >*------------------------------------------------------------------------------------ > aTables:={} > USE empmstb9 Alias "X0" > SELE X0 ; X0->(DbSetOrder(2)) > SET FILTER TO Left(X0->Code,4)=="AQEC" > SELE X0 ; X0->(DbSetOrder(2)) > X0->(DbGoTop()) > * > DO WHILE (! X0->(Eof())) > aAdd(aTables,{ X0->Code,AllTrim(X0->Name),X0->Trade}) > X0->(DbSkip()) > ENDDO > >*----------------------------------------------------------------------------------- > * > SELECT FROM empmstb9 VIA (oSession) > * > Browse() > > Disconnect from server > oSession:disconnect() >RETURN > >I am getting the following Error. If we remove the SET FILTER command, >this will work properly. What could be the reason ? > >------------------------------------------------------------------------------ >ERROR LOG of >"C:\Users\Kiran\Documents\Xbase++\projects\Postgres\Postgres.exe" >Date: 03/09/2019 12:39:10 > >Xbase++ version : Xbase++ (R) Version 2.00.1079 >Operating system : Windows 10 1803 Build 17134 >------------------------------------------------------------------------------ >oError:args : > -> NIL >oError:canDefault : N >oError:canRetry : Y >oError:canSubstitute: N >oError:cargo : NIL >oError:description : Unknown variable >oError:filename : >oError:genCode : 22 >oError:operation : aTables >oError:osCode : 0 >oError:severity : 2 >oError:subCode : 2000 >oError:subSystem : BASE >oError:thread : 1 >oError:tries : 1 >------------------------------------------------------------------------------ >CALLSTACK: >------------------------------------------------------------------------------ >Called from MAIN(33) > > > >Regards >Kiron | |
Jacob John | Re: Error in PGDBE on Tue, 12 Mar 2019 18:34:34 +0530 Hi, Nobody facing this issue ? Regards Kiron On Sat, 09 Mar 2019 12:56:57 +0530, Jacob John wrote: >Hi, > > >I was trying PGDBE. Please find the folowing code. This code took from >the xBase 2.0 documentation. I removed the SELECT command added the >code between the dot lines. > > >// PostgresSQL DBE header file is required >#include "pgdbe.ch" > >PROCEDURE Main > LOCAL cConnect > LOCAL oSession > > Load the PostgreSQL DatabaseEngine > IF(!DbeLoad("pgdbe")) > Alert( "Unable to load the PostgreSQL DatabaseEngine", {"Quit"} ) > QUIT > ENDIF > > Establish the connection > cConnect := >"DBE=pgdbe;SERVER=DDPLSVR;DB=bkcb9;UID=postgres;PWD=ddpl@2019" > oSession := DacSession():New( cConnect ) > > Check for connection success > IF .NOT. oSession:isConnected() > ? oSession:GetLastMessage() > Alert( "Unable to establish connection to server", {"Quit"} ) > QUIT > ENDIF > DbeSetDefault("PGDBE") > Perform simple select and browse > the result set > >*------------------------------------------------------------------------------------ > aTables:={} > USE empmstb9 Alias "X0" > SELE X0 ; X0->(DbSetOrder(2)) > SET FILTER TO Left(X0->Code,4)=="AQEC" > SELE X0 ; X0->(DbSetOrder(2)) > X0->(DbGoTop()) > * > DO WHILE (! X0->(Eof())) > aAdd(aTables,{ X0->Code,AllTrim(X0->Name),X0->Trade}) > X0->(DbSkip()) > ENDDO > >*----------------------------------------------------------------------------------- > * > SELECT FROM empmstb9 VIA (oSession) > * > Browse() > > Disconnect from server > oSession:disconnect() >RETURN > >I am getting the following Error. If we remove the SET FILTER command, >this will work properly. What could be the reason ? > >------------------------------------------------------------------------------ >ERROR LOG of >"C:\Users\Kiran\Documents\Xbase++\projects\Postgres\Postgres.exe" >Date: 03/09/2019 12:39:10 > >Xbase++ version : Xbase++ (R) Version 2.00.1079 >Operating system : Windows 10 1803 Build 17134 >------------------------------------------------------------------------------ >oError:args : > -> NIL >oError:canDefault : N >oError:canRetry : Y >oError:canSubstitute: N >oError:cargo : NIL >oError:description : Unknown variable >oError:filename : >oError:genCode : 22 >oError:operation : aTables >oError:osCode : 0 >oError:severity : 2 >oError:subCode : 2000 >oError:subSystem : BASE >oError:thread : 1 >oError:tries : 1 >------------------------------------------------------------------------------ >CALLSTACK: >------------------------------------------------------------------------------ >Called from MAIN(33) > > > >Regards >Kiron | |
Matej Jurac | Re: Error in PGDBE on Wed, 13 Mar 2019 09:18:24 +0100 Sorry , but there are only a few users who use pgdbe .... most of us use either ODBC or direct access library to work with postgresql Jacob John wrote in message news:9ibf8e9a09sqern51pj7t1e22de259t6r0@4ax.com... >Hi, > >Nobody facing this issue ? > >Regards >Kiron > >On Sat, 09 Mar 2019 12:56:57 +0530, Jacob John wrote: > >>Hi, >> >> >>I was trying PGDBE. Please find the folowing code. This code took from >>the xBase 2.0 documentation. I removed the SELECT command added the >>code between the dot lines. >> >> >>// PostgresSQL DBE header file is required >>#include "pgdbe.ch" >> >>PROCEDURE Main >> LOCAL cConnect >> LOCAL oSession >> >> Load the PostgreSQL DatabaseEngine >> IF(!DbeLoad("pgdbe")) >> Alert( "Unable to load the PostgreSQL DatabaseEngine", {"Quit"} ) >> QUIT >> ENDIF >> >> Establish the connection >> cConnect := >>"DBE=pgdbe;SERVER=DDPLSVR;DB=bkcb9;UID=postgres;PWD=ddpl@2019" >> oSession := DacSession():New( cConnect ) >> >> Check for connection success >> IF .NOT. oSession:isConnected() >> ? oSession:GetLastMessage() >> Alert( "Unable to establish connection to server", {"Quit"} ) >> QUIT >> ENDIF >> DbeSetDefault("PGDBE") >> Perform simple select and browse >> the result set >> >>*------------------------------------------------------------------------------------ >> aTables:={} >> USE empmstb9 Alias "X0" >> SELE X0 ; X0->(DbSetOrder(2)) >> SET FILTER TO Left(X0->Code,4)=="AQEC" >> SELE X0 ; X0->(DbSetOrder(2)) >> X0->(DbGoTop()) >> * >> DO WHILE (! X0->(Eof())) >> aAdd(aTables,{ X0->Code,AllTrim(X0->Name),X0->Trade}) >> X0->(DbSkip()) >> ENDDO >> >>*----------------------------------------------------------------------------------- >> * >> SELECT FROM empmstb9 VIA (oSession) >> * >> Browse() >> >> Disconnect from server >> oSession:disconnect() >>RETURN >> >>I am getting the following Error. If we remove the SET FILTER command, >>this will work properly. What could be the reason ? >> >>------------------------------------------------------------------------------ >>ERROR LOG of >>"C:\Users\Kiran\Documents\Xbase++\projects\Postgres\Postgres.exe" >>Date: 03/09/2019 12:39:10 >> >>Xbase++ version : Xbase++ (R) Version 2.00.1079 >>Operating system : Windows 10 1803 Build 17134 >>------------------------------------------------------------------------------ >>oError:args : >> -> NIL >>oError:canDefault : N >>oError:canRetry : Y >>oError:canSubstitute: N >>oError:cargo : NIL >>oError:description : Unknown variable >>oError:filename : >>oError:genCode : 22 >>oError:operation : aTables >>oError:osCode : 0 >>oError:severity : 2 >>oError:subCode : 2000 >>oError:subSystem : BASE >>oError:thread : 1 >>oError:tries : 1 >>------------------------------------------------------------------------------ >>CALLSTACK: >>------------------------------------------------------------------------------ >>Called from MAIN(33) >> >> >> >>Regards >>Kiron | |
Jacob John | Re: Error in PGDBE on Wed, 13 Mar 2019 14:57:05 +0530 Hi, I got reply from Alaska. They confirmed the error. Please refer follwing PDRs PDR 6970 PDR 6962 PDR 6961 Which is the "direct access library to work with postgresql". Where will i get this ? Is this support ISAM ? Regards Kiron On Wed, 13 Mar 2019 09:18:24 +0100, Matej Jurac wrote: >Sorry , but there are only a few users who use pgdbe .... most of us use >either ODBC or direct access library to work with postgresql > > > >Jacob John wrote in message news:9ibf8e9a09sqern51pj7t1e22de259t6r0@4ax.com... >>Hi, >> >>Nobody facing this issue ? >> >>Regards >>Kiron >> >>On Sat, 09 Mar 2019 12:56:57 +0530, Jacob John wrote: >> >>>Hi, >>> >>> >>>I was trying PGDBE. Please find the folowing code. This code took from >>>the xBase 2.0 documentation. I removed the SELECT command added the >>>code between the dot lines. >>> >>> >>>// PostgresSQL DBE header file is required >>>#include "pgdbe.ch" >>> >>>PROCEDURE Main >>> LOCAL cConnect >>> LOCAL oSession >>> >>> Load the PostgreSQL DatabaseEngine >>> IF(!DbeLoad("pgdbe")) >>> Alert( "Unable to load the PostgreSQL DatabaseEngine", {"Quit"} ) >>> QUIT >>> ENDIF >>> >>> Establish the connection >>> cConnect := >>>"DBE=pgdbe;SERVER=DDPLSVR;DB=bkcb9;UID=postgres;PWD=ddpl@2019" >>> oSession := DacSession():New( cConnect ) >>> >>> Check for connection success >>> IF .NOT. oSession:isConnected() >>> ? oSession:GetLastMessage() >>> Alert( "Unable to establish connection to server", {"Quit"} ) >>> QUIT >>> ENDIF >>> DbeSetDefault("PGDBE") >>> Perform simple select and browse >>> the result set >>> >>>*------------------------------------------------------------------------------------ >>> aTables:={} >>> USE empmstb9 Alias "X0" >>> SELE X0 ; X0->(DbSetOrder(2)) >>> SET FILTER TO Left(X0->Code,4)=="AQEC" >>> SELE X0 ; X0->(DbSetOrder(2)) >>> X0->(DbGoTop()) >>> * >>> DO WHILE (! X0->(Eof())) >>> aAdd(aTables,{ X0->Code,AllTrim(X0->Name),X0->Trade}) >>> X0->(DbSkip()) >>> ENDDO >>> >>>*----------------------------------------------------------------------------------- >>> * >>> SELECT FROM empmstb9 VIA (oSession) >>> * >>> Browse() >>> >>> Disconnect from server >>> oSession:disconnect() >>>RETURN >>> >>>I am getting the following Error. If we remove the SET FILTER command, >>>this will work properly. What could be the reason ? >>> >>>------------------------------------------------------------------------------ >>>ERROR LOG of >>>"C:\Users\Kiran\Documents\Xbase++\projects\Postgres\Postgres.exe" >>>Date: 03/09/2019 12:39:10 >>> >>>Xbase++ version : Xbase++ (R) Version 2.00.1079 >>>Operating system : Windows 10 1803 Build 17134 >>>------------------------------------------------------------------------------ >>>oError:args : >>> -> NIL >>>oError:canDefault : N >>>oError:canRetry : Y >>>oError:canSubstitute: N >>>oError:cargo : NIL >>>oError:description : Unknown variable >>>oError:filename : >>>oError:genCode : 22 >>>oError:operation : aTables >>>oError:osCode : 0 >>>oError:severity : 2 >>>oError:subCode : 2000 >>>oError:subSystem : BASE >>>oError:thread : 1 >>>oError:tries : 1 >>>------------------------------------------------------------------------------ >>>CALLSTACK: >>>------------------------------------------------------------------------------ >>>Called from MAIN(33) >>> >>> >>> >>>Regards >>>Kiron | |
Jim Lee | Re: Error in PGDBE on Wed, 13 Mar 2019 11:27:55 +0100 Hi, > I got reply from Alaska. They confirmed the error. Please refer > follwing PDRs > > PDR 6970 > PDR 6962 > PDR 6961 as i can say there are still a lot of Problem with ISAM Emulation. ... but it also depend on your Source. > Which is the "direct access library to work with postgresql". >Where will i get this ? Is this support ISAM ? you need 32 Bit libpq.dll (and other \bin\*.DLL) and a Wrapper for Xbase++ like CLASS PGSql from Phil Ide at www.xbwin.com you will find a ot4xb Version instead of BAP that Phil have used. CLASS PGSql is ONLY a Wrapper to call libpq.dll it does not contain anything else ! you have to write from start all what you need ... don't try to emulate ISAM Style Demo of Phil Ide include some Sample but you will find more in Newsgroup. Code is from 2003 for PostgreSQL v7.3 but you still can take 32 Bit libpq.dll from Server (\bin\*.DLL) and it work ! this (hard) Way you will learn PostgreSQL and get a Interface which is much better while you have full Control (if you know what you are doing) have fun --- Diese E-Mail wurde von AVG auf Viren geprüft. http://www.avg.com | |
Peter Alderliesten | Re: Error in PGDBE on Thu, 14 Mar 2019 10:17:14 +0100 Kiron, > Hi, > > I got reply from Alaska. They confirmed the error. Please refer > follwing PDRs > > PDR 6970 > PDR 6962 > PDR 6961 > > Which is the "direct access library to work with postgresql". Where > will i get this ? Is this support ISAM ? > > Regards > Kiron Direct access means that you write SQL statements and send these to the server for processing, i.e. not using the ISAM method. In their mailing Alaska gave the impression that the probelms around ISAM use had been resolved. So you should take this up with Alaska Support. Peter | |
Jacob John | Re: Error in PGDBE on Thu, 14 Mar 2019 17:31:15 +0530 Peter/Jim, Yes. Have contacted Alaska. They replied that there is a plan to release an upgrade by the end of this month which cover these issues. Regards Kiron On Thu, 14 Mar 2019 10:17:14 +0100, Peter Alderliesten wrote: >Kiron, > >> Hi, >> >> I got reply from Alaska. They confirmed the error. Please refer >> follwing PDRs >> >> PDR 6970 >> PDR 6962 >> PDR 6961 >> >> Which is the "direct access library to work with postgresql". Where >> will i get this ? Is this support ISAM ? >> >> Regards >> Kiron > >Direct access means that you write SQL statements and send these to the >server for processing, i.e. not using the ISAM method. >In their mailing Alaska gave the impression that the probelms around ISAM >use had been resolved. So you should take this up with Alaska Support. > >Peter | |
Peter Alderliesten | Re: Error in PGDBE on Sat, 30 Mar 2019 11:19:40 +0100 Kiron, > Peter/Jim, > > Yes. Have contacted Alaska. They replied that there is a plan to > release an upgrade by the end of this month which cover these issues. > > Regards > Kiron It seems we have to wait at least another month. I don't think that the SQL implementation is an easy path for Xbase++ although I really hoped we would have been a lot further on this track. Peter |