Execute a block of execution (SQL Server) in Doctrine + ZF2

1

I need to execute a SQL execution block (SQL SERVER) on a Repository in Doctrine. My environment is with ZF2 + Doctrine 2. I've read a few things about ResultSetMapping in Doctrine, but I could not.

Code:

public function teste() {
        $connection = $this->_em->getConnection();
        $sql = "DECLARE @Test AS dbo.DataTempTransactions;
                INSERT INTO @Test VALUES ('015.004.000',100,'015A')
                DECLARE @DATE datetime
                SET @DATE = GETDATE()
                EXEC ONCode.dbo.TmSp_Exit @Test, @mnfdate = @DATE
                SELECT * FROM ONTest.dbo.OBTN";
        $stmt = $connection->prepare($sql);

        return $stmt->execute();
}

I am using a user-defined type in the block of a run - dbo.DataTempTransactions - ( Use Table-Valued Parameters (Database Engine) , I do not know if it influences anything.

Thank you in advance.

    
asked by anonymous 11.03.2015 / 16:29

0 answers