NO COUNT

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Stephen Howe (stephenPOINThoweATtns-globalPOINTcom)
Date: 10/22/04


Date: Fri, 22 Oct 2004 17:00:35 +0100

Hi,

I have some import programs that are written in C++ and use ADO to import
into a SQL Server 7 database. At the start of the process I issue

SET NOCOUNT ON

just after starting a transaction and

SET NOCOUNT OFF

just before committing/aborting a transaction

All of this is so that SP's (including temporary SP's setup by ADO's Command
objects) execute a tad faster.

Does anyone want to comment whether this is good, bad or "makes no
difference" practice?

Thanks

Stephen Howe



Relevant Pages

  • RE: Foreign Key Violations During Insert in Transaction
    ... parent row into the database, SQL Server generates a new identity value. ... that value does really exist even before you commit the transaction. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: statement not allowed within multi-statement transaction (Long)
    ... So if I do have an open transaction I can't figure ... > 100 Database does not exist in sysdatabases can not dettach ... > --Verify database Exiists for detach ... >> Wayne Snyder, MCDBA, SQL Server MVP ...
    (microsoft.public.sqlserver.programming)
  • Re: Insert Into Without Log
    ... level of logging of logged in the database ... transaction log, however, you can minimize this via setting the database ... >> Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Checkpointing Not Happening in Simple Recovery Model
    ... The log cannot be truncated beyond the first open transaction. ... Columnist, SQL Server Professional ... We would then have to issue an alter database ... we can manually issue a checkpoint. ...
    (microsoft.public.sqlserver.server)
  • Re: SQLNCLI is not allowing CREATE DATABASE inside a TRansaction
    ... successfully call CREATE DATABASE. ... CREATE DATABASE statement not allowed within multi-statement transaction. ... open a second connection to SQL Server behind the back. ... I can post that some test program using JDBC ...
    (microsoft.public.data.oledb)