| Author | Topic: No records visible |
---|
| Jacob John | No records visible
on Mon, 25 Feb 2019 17:13:36 +0530Hi,
I am new to PGDBE. I was trying to test PGDBE. Please find the below
code.
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=localhost;DB=northwind;UID=postgres;PWD=postgres"
oSession := DacSession():New( cConnect )
Check for connection success
IF .NOT. oSession:isConnected()
? oSession:GetLastMessage()
Alert( "Unable to establish connection to server", {"Quit"} )
QUIT
ENDIF
Perform simple select and browse
the result set
USE customers NEW VIA (oSession)
SELECT FROM customers VIA (oSession)
Browse()
Disconnect from server
oSession:disconnect()
RETURN
The output is and empty browser with no records. But if you remove USE
command and use the SELECT command the output shows records. why ? Is
there any additional settings to be done ?
Regards
Kiron |
| Peter Alderliesten | Re: No records visible
on Mon, 25 Feb 2019 15:33:05 +0100Kiron,
Did you upsize your data using the upsize tool?
Peter |
| Jacob John | Re: No records visible
on Tue, 26 Feb 2019 11:16:37 +0530Peter,
Yes. It is working if we use SELECT Command.
Kiron
On Mon, 25 Feb 2019 15:33:05 +0100, Peter Alderliesten wrote:
>Kiron,
>
>Did you upsize your data using the upsize tool?
>
>Peter |
| Jacob John | Re: No records visible
on Wed, 27 Feb 2019 11:14:47 +0530Hi Peter,
It worked. It was my mistake. I was trying to use 'customers' table in
northwind database. Actually it was 'customer' table in mdidemo db.
Thanks
Regards
Kiron
On Mon, 25 Feb 2019 15:33:05 +0100, Peter Alderliesten wrote:
>Kiron,
>
>Did you upsize your data using the upsize tool?
>
>Peter |