Click here to Skip to main content
15,893,381 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: vb.net-code error Pin
Pete O'Hanlon10-Aug-09 23:21
mvePete O'Hanlon10-Aug-09 23:21 
Questionvb.net-code error again Pin
myinstincts10-Aug-09 22:15
myinstincts10-Aug-09 22:15 
AnswerRe: vb.net-code error again Pin
0x3c010-Aug-09 22:18
0x3c010-Aug-09 22:18 
AnswerRe: vb.net-code error again Pin
Hristo-Bojilov10-Aug-09 22:21
Hristo-Bojilov10-Aug-09 22:21 
Questionvb.net-code error Pin
myinstincts10-Aug-09 21:27
myinstincts10-Aug-09 21:27 
AnswerRe: vb.net-code error Pin
Hristo-Bojilov10-Aug-09 21:51
Hristo-Bojilov10-Aug-09 21:51 
AnswerRe: vb.net-code error Pin
0x3c010-Aug-09 21:52
0x3c010-Aug-09 21:52 
QuestionEntityFramework and "set transaction isolation level read uncommitted" Pin
MartyK200710-Aug-09 7:43
MartyK200710-Aug-09 7:43 
Hello,
I have an issue with EntityFramework and "set transaction isolation level read uncommitted"

We have changed EF to call a base class (by not using the edmx , this is possible)
In the base class we have overridden the createQuery method to include a call to a SSDL function
<Function Name="Uncommitted" IsComposable="false">
<CommandText>
set transaction isolation level read uncommitted
</CommandText>
</Function>

The reason we do this is so emulate (nolocks) on our sql and thereby help performance of our ASP Web Pages.

This however has brought up a problem.

we have an admin function that has a problem. (DeliveryMethods)

I have a attribute table which is keyed by deliveryMethod and attribute type.

Say I have RowA on that table.

I change and save a value on RowA using an enitiy object in the entityframework.

I then move off to another web page and copy RowA, again using an entity object in entityframework.
The problem is the copy of RowA contains the original values and not the changed ones.

If I do an IIS reset between the amendments and the copy then the new RowA has the changed values so it works ok.

looking at the SQL profiler - The update to the original RowA is
exec sp_executesql N'update [dbo].[DeliveryMethodsRuleAttributes]
set [IntAttribute] = @0, [LastUpdated] = @1, [LastUpdatedBy] = @2
where ([Id] = @3)
',N'@0 int,@1 datetime,@2 nvarchar(4),@3 uniqueidentifier',@0=40000,@1='2009-08-10 17:39:20:383',@2=N'mken',@3='2B60D845-411B-4337-A887-B6BB0F9B9309'


I changed @0 from 30000 to 40000.

The copy process does not issue an SQL Request , so there is no SQL read.
The Copy insert is.

exec sp_executesql N'insert [dbo].[DeliveryMethodsRuleAttributes]([Id], [DeliveryMethodRuleId], [DeliveryMethodId], [AttributeName], [DateTimeAttribute], [IntAttribute], [DecimalAttribute], [TextAttribute], [Created], [CreatedBy], [LastUpdated], [LastUpdatedBy])
values (@0, @1, @2, @3, null, @4, null, null, @5, @6, @7, @8)
',N'@0 uniqueidentifier,@1 uniqueidentifier,@2 uniqueidentifier,@3 nvarchar(14),@4 int,@5 datetime,@6 nvarchar(4),@7 datetime,@8 nvarchar(4)',@0='0264FECD-5EE4-49D3-9CE0-72BAAC11DAA6',@1='722456F0-ACE1-44B0-9568-A03CDD4453C5',@2='053C32B3-808C-4375-9826-02BDC55A8791',@3=N'PriceInCentsTo',@4=30000,@5='2009-08-10 17:42:03:780',@6=N'mken',@7='2009-08-10 17:42:03:780',@8=N'mken'

@4 is set to 30000, which was the original RowA value.

If I deactivate the "set transaction" then this problem does not happen.
Displosing and Closing the EF after the update of RowA has no effect.

Based on the SQL Profile, my theory is that the "uncommited" value is being held in the entityframework and/or underlying ado libraries and this cache is "feeding" the copy of RowA.

My Question is - How do I reset this cache after an update so that the next read uses the SQL DB?

Thanks
Martin

life is a bowl of cherries
go on take a byte

QuestionMaximum password age for local user Pin
Stephen Grundy10-Aug-09 2:18
Stephen Grundy10-Aug-09 2:18 
AnswerRe: Maximum password age for local user Pin
Luc Pattyn10-Aug-09 2:58
sitebuilderLuc Pattyn10-Aug-09 2:58 
GeneralRe: Maximum password age for local user Pin
Stephen Grundy10-Aug-09 3:13
Stephen Grundy10-Aug-09 3:13 
Questiondatareader Pin
myinstincts10-Aug-09 0:43
myinstincts10-Aug-09 0:43 
AnswerRe: datareader [modified] Pin
Moreno Airoldi10-Aug-09 0:44
Moreno Airoldi10-Aug-09 0:44 
AnswerRe: datareader Pin
Muhammad Mazhar10-Aug-09 1:22
Muhammad Mazhar10-Aug-09 1:22 
Questionimplementing filter for listbox in windows application Pin
sandhya149-Aug-09 23:31
sandhya149-Aug-09 23:31 
AnswerRe: implementing filter for listbox in windows application Pin
Luc Pattyn10-Aug-09 0:05
sitebuilderLuc Pattyn10-Aug-09 0:05 
Questionadding a program to right-click menu during installation Pin
oedipusrex9-Aug-09 6:51
oedipusrex9-Aug-09 6:51 
AnswerRe: adding a program to right-click menu during installation Pin
Arindam Sinha9-Aug-09 7:25
Arindam Sinha9-Aug-09 7:25 
GeneralRe: adding a program to right-click menu during installation Pin
oedipusrex10-Aug-09 13:13
oedipusrex10-Aug-09 13:13 
GeneralRe: adding a program to right-click menu during installation Pin
Arindam Sinha10-Aug-09 22:41
Arindam Sinha10-Aug-09 22:41 
GeneralRe: adding a program to right-click menu during installation Pin
oedipusrex10-Aug-09 22:47
oedipusrex10-Aug-09 22:47 
GeneralRe: adding a program to right-click menu during installation Pin
Arindam Sinha11-Aug-09 0:41
Arindam Sinha11-Aug-09 0:41 
QuestionLinq Vs Stored Procedure Pin
Rolando Y. Puno7-Aug-09 16:08
Rolando Y. Puno7-Aug-09 16:08 
AnswerRe: Linq Vs Stored Procedure Pin
N a v a n e e t h7-Aug-09 18:25
N a v a n e e t h7-Aug-09 18:25 
GeneralRe: Linq Vs Stored Procedure Pin
Not Active8-Aug-09 6:22
mentorNot Active8-Aug-09 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.