dlr at dlr at
Thu Jul 7 16:47:09 UTC 2022

Hello Das,

I would strongly recommend that you build out your sql statement first so you can easily see what the statement actually is before executing it.

Begin statement 
Sta: INSERT INTO dtcustomers
Sta: [$ctask.tSessObjPGRef.$insertnames(iro)]
Sta: RETURNING cust_id
End statement 
Get statement lsqlstatement
Do tStatObjPGRef.$execdirect([lsqlstatemen]} Returns #F

This allows you to see what statement has been formed and to check if it is correct. During debug you can put a breakpoint at the execute and view the sql generated and correct it before you execute it. This also simplifies finding errors as well as you know exactly what is going to be executed.

Dan Ridinger

> On Jul 7, 2022, at 9:04 AM, Das Goravani <goravanis at> wrote:
> I’m having trouble inserting my first record into a Postgres database. 
> I’m logged on, have a session
> I can’t get either of the following two insert types to work, they return flag false.
> Do tStatObjPGRef.$execdirect(con('INSERT INTO dtcustomers ',$ctask.tSessObjPGRef.$insertnames(iro),' RETURNING  cust_id')) Returns #F
> Do iro.$definefromsqlclass('scustomers')
> Do iro.$sessionobject.$assign($ctask.tSessObjPGRef) Returns #F
> Do iro.$insert(' RETURNING cust_id') Returns #F
> Any ideas why I might be getting flag false?
> I checked the $insertnames, and found that it is working correctly. 
> _____________________________________________________________
> Manage your list subscriptions at
> Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list