SQL statement doesn't return rows?

Discussion of open issues, suggestions and bugs regarding EntityDAC
Post Reply
AudioPat
Posts: 10
Joined: Fri 19 Jun 2015 15:47

SQL statement doesn't return rows?

Post by AudioPat » Tue 08 Mar 2016 08:53

Hello,

When we save a updated entity, this result into a SQL statement doesn't return rows error?
The entity has assocations.

Why do you declare a temp table for updating a record?

Code: Select all

DECLARE @tempVar TABLE(ContainerID INT); update dbo.Moves set VerhuurOrderID = @P1  OUTPUT INSERTED.ContainerID INTO @tempVar  where ID = @P2',N'@P1 int,@P2 int',3,33
When setting 'VerhuurOrderID = Value' then the SQL statement doesn't return rows. When you do not set this ID, the update is succesfully updated.

Code: Select all

  aMove.VerhuurOrderID := aVerhuurOrder.ID;
  DataContext.Save(aMove); // SQL statement doens't return rows.

Code: Select all

  //aMove.VerhuurOrderID := aVerhuurOrder.ID;
  DataContext.Save(aMove); // Update succes

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQL statement doesn't return rows?

Post by AlexP » Wed 09 Mar 2016 13:19

Hello,

We can't reproduce the problem. Please send your model and a sample to support*devart*com .

Post Reply