Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem while executing Query batch Expand / Collapse
Author
Message
Posted Tuesday, July 14, 2009 4:53 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 1, 2011 3:14 AM
Points: 11, Visits: 45
Im running batch of query using c# code.
each query is seperated by(;). When i excecute some deadlock type condition occurs.
Batch can be anything like
select * from tbl1;Update tbl2...; declare cursor... etc
So can we stop execution of batch if this contains (;)
Post #752570
Posted Tuesday, July 14, 2009 5:56 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 4:17 AM
Points: 1,101, Visits: 5,279
Instead of running batch of query using C# code,
create a stored procedure with all these queries and call the stored procedure from the C# code.
Post #752598
Posted Tuesday, July 14, 2009 9:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:37 PM
Points: 7,042, Visits: 12,969
triple post.
please see here and here . All posts have one answer so far, making it hard to tell where to continue if required...




Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #752748
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse