Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two services and they are calling different store Proc. But both the store Proc are fetching data from same table. Sometimes, the same record from the table is being fetched by both service.
Sometimes, I am facing Null object reference error. I am not sure if this may be one of the cause. Can you one please help me.

What I have tried:

I have tried to run both services locally, but no issue found. But issue is happening in production.
Posted
Comments
an0ther1 15-Jun-16 18:09pm    
Improve your question by adding additional detail.
There is several reasons as to why the problem may be occurring but without an idea of what your Stored Procedures look like & additional details we cannot provide any information.
Typically when a stored procedure is called (assuming no record locking is used & no read hints) then both should return the expected data but if one is using ReadCommitted and the other is using ReadCommittedLock then you may experience this.

Kind Regards
Member 7434378 15-Jun-16 20:30pm    
Show some code, but a null reference error occurs when you referencing something that is null, you declared an object but didn't initialize it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900