Hello,
Using the schema modeler I’ve mapped a stored procedure (GetEventsHistory) into a table (dbo_EventsHistory) and then I would like to write:
…
_Module.LinqDataAdapter.GetTable<dbo_EventsHistory>().InsertRow(data);
_Module.LinqDataAdapter.ApplyChanges();
but the following error occurs:
RemObjects.DataAbstract.DAUpdatesFailedException: 'One or more updates failed to apply on the server.
Caused by this SQL Server statement executed by DA:
declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@EventId bigint,@Text nvarchar(500),@Status nvarchar(50),@EventTimeOn datetime,@EventTimeOff datetime,@Sender nvarchar(500),@Priority int',N'INSERT INTO **[]** (
[EventId],
[Text],
[Status],
[EventTimeOn],
[EventTimeOff],
[Sender],
[Priority])
VALUES (
@EventId,
@Text,
@Status,
@EventTimeOn,
@EventTimeOff,
@Sender,
@Priority)',@EventId=0,@Text=NULL,@Status=N'ManualShut',@EventTimeOn='2018-07-02 14:52:59.893',@EventTimeOff='2018-07-02 14:53:06.370',@Sender=NULL,@Priority=NULL
select @p1
It seems that the table name is empty but DA should know the entity name (from the same metadata you retrieve to get SP’s infos). Where’s the catch?
Thank you,
Matteo