Migration from Oracle to PG

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
OdacPgdac
Posts: 1
Joined: Mon 16 Aug 2021 12:40

Migration from Oracle to PG

Post by OdacPgdac » Mon 16 Aug 2021 13:00

odac
component TOraSQL

Code: Select all

begin
  :param1 := 5;
end;
after execution i can get result of out parameter

Code: Select all

OraSQL->ParamByName("param1")->AsInteger;
pgdac
component TPgSQL

Code: Select all

DO $$
BEGIN
  :param1 := 5;
END $$;
after execution i get error "syntax error at or near ":""
how to use out parameter in pg?

evgeniym
Devart Team
Posts: 44
Joined: Thu 13 May 2021 07:08

Re: Migration from Oracle to PG

Post by evgeniym » Wed 18 Aug 2021 04:34

Hi there!
Thanks for your question!
DO - execute an anonymous code block, it returns no results.
For more details, please see this documentation:
https://www.postgresql.org/docs/13/sql-do.html

Let us know if you have any questions!

Post Reply