Alaska Software Inc. - No records visible
Username: Password:
AuthorTopic: No records visible
Jacob JohnNo records visible
on Mon, 25 Feb 2019 17:13:36 +0530
Hi,

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 AlderliestenRe: No records visible
on Mon, 25 Feb 2019 15:33:05 +0100
Kiron,

Did you upsize your data using the upsize tool?

Peter
Jacob JohnRe: No records visible
on Tue, 26 Feb 2019 11:16:37 +0530
Peter,

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 JohnRe: No records visible
on Wed, 27 Feb 2019 11:14:47 +0530
Hi 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