Sql insert error if roAfterInsert selected
Posted: Wed 13 Jul 2016 10:24
I'm using unidac 6.2.9 for delphi2007, ODBC provider and Actian PSQL 12.
UniQuery.sql is something simple like "select * from table".
if RefreshOptions has roAfterInsert during INSERT query like
is generated automatically. Problem is that PSQL doesn't like at all from field name like _0 and _1 unless they are quoted but unfortunatelly QuoteFields doesn't affect to that.
Edit:
I'm trying to refresh data because I need that FIELD1 value after insert. Field1 is Identity field.
Can't just get it with odbc-provider. if using separete sql statements, i would first execute insert and after
that execute query "select @@identity " but that's now difficult, because queries are connected to datagrid.
UniQuery.sql is something simple like "select * from table".
if RefreshOptions has roAfterInsert during INSERT query like
Code: Select all
select "Field1" as _0, "Field2" as _1 FROM table WHERE "Field1" IS NULL
Edit:
I'm trying to refresh data because I need that FIELD1 value after insert. Field1 is Identity field.
Can't just get it with odbc-provider. if using separete sql statements, i would first execute insert and after
that execute query "select @@identity " but that's now difficult, because queries are connected to datagrid.