Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Thursday, March 31, 2016 4:30 AM
Points: 15, Visits: 48
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: Wednesday, May 25, 2016 2:48 AM
Points: 1,101, Visits: 5,309
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: Wednesday, February 10, 2016 11:50 AM
Points: 6,897, Visits: 13,559
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