Postgres Omnis
Thanks Guys for your help, just hand to remove the square brackets.
Documents seem to indicate they needed.
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf
Of Chris Hughes
Sent: Thursday, 15 February 2018 8:58 AM
To: ‘OmnisDev List – English’
Subject: Postgres Omnis
I am trying to delete a whole table with following command.
This basic command runs in the PGAdmin window.
; pTableName
; “Truncate” is SQL for delete all records
;
Do tSessionObj.$newstatement Returns LvStatementObj
If isclear(LvStatementObj)
Breakpoint {bug trap}
End If
Calculate LvSQL as con(‘TRUNCATE TABLE ‘,pTableName,’ RESTART IDENTITY;’)
Do LvStatementObj.$prepare([LvSQL]) Returns LvError ;; LvStatementObj
Do LvStatementObj.$execute() Returns LvError ;; LvStatementObj
If LvStatementObj.$errorcode
OK message Truncate Delete Failed {[LvStatementObj.$nativeerrortext]
[LvStatementObj.$errorcode]}
Quit method kFalse
End If
Quit method kTrue
Chris Hughes
Copious Data Pty Ltd (Trading as Atad Data)
Unit 8 /3460 Pacific Highway
Springwood QLD 4127
Phone No:- 07 3208 6347
Mobile No:- 0409 263 349
Fax No:- 07 3208 9347
Email:- ataddata@bigpond.net.au
Web Site:- ataddata.com.au
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com Start a new
message -> mailto:omnisdev-en@lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en@lists.omnis-dev.com