CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    5

    Crystal XI locking tables when running report

    An end user has a report that connects to selected sql tables and I placed filters from the report, but when the report runs it locks the tables. Is there an option/feature within the report designer where I can set a NOLOCK setting? There are several reports that connect to tables and it's causing the same issue.

    thx,

    John

  2. #2
    Join Date
    Sep 2006
    Posts
    5

    Re: Crystal XI locking tables when running report

    Alright, since nobody has been able to figure this one out, let me make it easier. I just found to from the Crystal Report people the options below:

    "You can change the isolation level of the odbc connection, just lookup change isolation level odbc on google. Another option is to use command object in crystal reports, and specify, as part of the sql statement, the isolation level, before the rest of the select statement."

    My question now is how do I know what value the isolation level should be and what is its meaning? and what should be the syntax?

  3. #3
    Join Date
    Jul 2009
    Posts
    6

    Re: Crystal XI locking tables when running report

    SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

    (http://msdn.microsoft.com/en-us/libr...SQL.80%29.aspx)

    Which I know because I have been trying to figure out ANY reasonable way to get (NOLOCK) or the above into some reports that are involved in an occasional deadlock on my SQL Server.

    Basics:

    I have a report built in CRXIr2 that joins about 8 tables. A VB6 app programmatically applies some dynamic filter and sort criteria.

    1. I cannot change the reports to use view with (nolock) since that would break all the filter sort code.

    2. I does not appear that the SQLQueryString is editable at run-time.

    3. I tried adding a command object that that set the isolation level and selects an empty literal string. I place the result of the command object on the report to force the command object to be run. Yes, that is a complete hack.

    I've watched the report run via SQL Profiler with the command object and it looks like it *might* be working. The results are a little ambiguous.

    Anyone have other ideas, advice or comments?

    Thanks,

    Karl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured