How execute an insert in a Trigger using table with Engine CONNECT?

Hello Guys

I hope you are fine. I have a project, where I need to insert data on a MS SQL SERVER 200R2 from a MariaBD table using a Trigger after insert.

I can define the table with Engine CONNECT with ODBC, and I can insert records using querys without any message, the data is showed on the MS SQL Server.

But, When I use the same query on the table by a TRIGGER of BEFORE INSERT, for example:

CREATE DEFINER=`root`@`localhost` TRIGGER `transactions_poll_before_insert` BEFORE INSERT ON `transactions_poll` FOR EACH ROW BEGIN INSERT INTO test.poll (poll.PO_LINX, poll.PO_NUMERO, poll.PO_FECHA ) VALUES ( CAST(NEW.trans_device AS CHAR(11) ), CAST(NEW.trans_userid AS INTEGER), CAST( new.trans_datetime AS DATETIME) ); END

The trigger generateS the error: Error of SQL(1045):Access denied for user 'roor'@'localhost' (using password: YES)

I am using the root user with default password, but I am confused that works in normal query, but always fails when ran from a trigger. Please your help to understand if I need to define and adddtional parameters, or maybe is an issue.

Thanks in advance. Dante Cortes [email protected]

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.