Re: Setting NO COUNT default on a connection only(not the entire datab
- From: "William \(Bill\) Vaughn" <billvaNoSpam@xxxxxxxxx>
- Date: Sat, 1 Nov 2008 15:05:08 -0700
No, not really. SET statements can only be set via a TSQL script.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"bryme" <bryme@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:9ACAD204-66AC-45E2-A548-EA87881A098A@xxxxxxxxxxxxxxxx
Is there a way to specify in a connection string that NOCOUNT should be set
ON for a specific SQL Server connection?
We have some databases that will need to be consolidated onto a sinlge
database instance. The majority of the databases require NO COUNT to be set
OFF, while there are also custom developed databases that require that NO
COUNT be set ON. We would rather not have to separate the databases, but
want to know short of updating the code and re-testing for the custom
databases, if there would be parameters that could be set in the database
connection string for the applications. We are using ADO and ADO.Net and the
OLEDB drivers for SQL.
I know there is the default connection setting, but that applies the setting
for the entire database server. We'd like to be able to connect specific to
a database and specify that setting. In Query Analyzer/Management Studio,
that is easily accomplished via either the Advanced Execution setting or
executing the SET statement to change the setting, so surmised there must be
something we can add to our connection strings to accomplish this.
Any ideas?
.
- References:
- Prev by Date: Re: Setting NO COUNT default on a connection only(not the entire datab
- Next by Date: How do I do this VB6 ADO code in ADO .NET
- Previous by thread: Re: Setting NO COUNT default on a connection only(not the entire datab
- Next by thread: Number of tables in one Entity Data Model (EDMX)
- Index(es):
Relevant Pages
|