TMyQuery problems with IN OUT parameters

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
amorancho84
Posts: 4
Joined: Tue 15 Sep 2020 08:00

TMyQuery problems with IN OUT parameters

Post by amorancho84 » Tue 15 Sep 2020 08:33

In the past I worked with the ODAC (oracle) components and we used the Query component (I don't remember the exact name). And we had this:

Table CUSTOMER
ID AUTOINCREMENT
NAME VARCHAR(100)

SQL

Code: Select all

select * from customer
SQLInsert

Code: Select all

BEGIN

  CUSTOMERS.Customer_Mng
  (
    :Customer_Id,  --p_Id IN OUT PARAMETER
    :Customer_Name,
    'I'                        -- p_TipAcc (I: Insert; U: Update; D: Delete)
  );

END;
SQLUpdate

Code: Select all

BEGIN

  CUSTOMERS.Customer_Mng
  (
    :Customer_Id,  --p_Id IN OUT PARAMETER
    :Customer_Name,
    'U'                        -- p_TipAcc (I: Insert; U: Update; D: Delete)
  );

END;
SQLDelete

Code: Select all

BEGIN

  CUSTOMERS.Customer_Mng
  (
    :Customer_Id,  --p_Id IN OUT PARAMETER
    :Customer_Name,
    'D'                        -- p_TipAcc (I: Insert; U: Update; D: Delete)
  );

END;
How would you do it in MySQL/MariaDB using packages?

the ReturnParams property is true in TMyQuery

In InsertMode I try to use

call CUSTOMERS.Customer_Mng(:Customer_Id, :Customer_Name, 'I') but doesn`t work.

Thanks
Last edited by amorancho84 on Wed 16 Sep 2020 20:14, edited 1 time in total.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TMyQuery problems with IN OUT parameters

Post by ViktorV » Fri 18 Sep 2020 15:23

MySQL does not fully support MySQL\MariaDB packages at this time.
We will consider adding this functionality in a future release of MyDAC.

Post Reply