Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 'With Nolock' in Crystal Reports

Status
Not open for further replies.

krshtej

MIS
Jan 3, 2011
22
US
Hi,

I have a general question. When we see the code behind in crystal reports it is not showing any 'With (NOLOCK)' for the tables. Wont this result in dead lock situation or performance issues?
Is there a way to insert that 'With (NOLOCK)' while designing a report. (General designing not using Add Command).

Thanks,
Krshtej.
 
You can use command or stored proceduretp retrieve the data and use WITH NOLOCK.


Viewer, scheduler and report manager for Crystal reports and SSRS.
Send your report everywhere.
 
The way Crystal interacts with your database is controlled by the database..Since you are not updating the data just retrieving it, it should never cause a deadlock (unless your database is badly designed or configured)
Most modern database engines provide retrieval of a version of the data as it existed at the moment the connection was made.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I totally missed the part for the deadlocks.
"WITH NOLOCK" will allow you to read uncommitted data. Your report may be ready faster but it may contain dirty data. Are you sure you want this ?

Viewer, scheduler and report manager for Crystal reports and SSRS.
Send your report everywhere.
 
Hi RTag,

Actually in my company they are using in that way (WITH (NOLOCK)) to retrieve the data fast. So, just to go with the company we have to do that. Thanks for the help though!

--Krshtej.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top