Page 1 of 1

[3.0.5 MSSQL 2008] Bug on generate save sql

Posted: Thu 06 Oct 2011 09:54
by Kam
Hello

On

Table().InsertOnSubmit(Entity);
db.SubmitChanges();

generate next sql:

Code: Select all

declare @p14 int
set @p14=NULL
declare @p15 nvarchar(49)
set @p15=NULL
exec sp_executesql N'INSERT INTO tUsers (FirstName, LastName, Login, Password, IsAdmin, CreateDate, LastVisit, DefaultLanguageID, Deleted, Email, Nick) VALUES (@p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11) ; SELECT @@ret1 = ID, @@ret2 = Name FROM tUsers WHERE ID = SCOPE_IDENTITY()',N'@p1 nvarchar(5),@p2 nvarchar(8),@p3 nvarchar(3),@p4 nvarchar(1),@p5 bit,@p6 datetime,@p7 datetime,@p8 int,@p9 bit,@p10 nvarchar(13),@p11 nvarchar(3),@ret1 int output,@ret2 nvarchar(49) output',@p1=N'Denis',@p2=N'Sahoshko',@p3=N'kam',@p4=N'1',@p5=1,@p6=NULL,@p7=NULL,@p8=NULL,@p9=0,@p10=N'[email protected]',@p11=N'Kam',@ret1=@p14 output,@ret2=@p15 output
select @p14, @p15
and get error:
You must declare the scalar variable "@@ret1".

Need replace
SELECT @@ret1 = ID, @@ret2 = Name FROM tUsers
on
SELECT @ret1 = ID, @ret2 = Name FROM tUsers

Posted: Mon 10 Oct 2011 13:22
by StanislavK
We have fixed this bug, the fix will be available in the nearest build. We will post here when this build is released.

Posted: Thu 17 Nov 2011 08:56
by StanislavK
The fix is available in the latest 3.0.14 build of LinqConnect. The new build can be downloaded from
http://www.devart.com/linqconnect/download.html
(the trial and free versions) or from Registered Users' Area (for users with active subscription only).

For the detailed information about the fixes and improvements available in LinqConnect 3.0.14, please refer to
http://www.devart.com/forums/viewtopic.php?t=22548