Board index » delphi » Curiosity about TADODataset

Curiosity about TADODataset


2003-11-07 03:35:31 AM
delphi118
Does anyone out there use the SET NOCOUNT ON option when using a TADODatset?
TADODataset.CommandType := cmdText;
For instance;
SET NOCOUNT ON
SELECT *
FROM tmpCompanyProducts
WHERE CompanyProductsIndex IS NULL
Is this better than just;
SELECT *
FROM tmpCompanyProducts
WHERE CompanyProductsIndex IS NULL
Is there any benefit to this? I know that i include it in most of my sproc's
just to eliminate the extra bits being passed back across the network. Does
this have the same effect when using the TADODataset or TADOQuery?
Thanks for your time,
Brian
 
 

Re:Curiosity about TADODataset

SQL Server returns the number of rows affected for a Transact SQL statement.
On SP executing a lot of statements it can generate a lot of extra traffic,
not in a single SQL sentence.
--
Guillermo Castaņo A.
www.GrupoMillennium.com
"Brian Hollister" <bhollisterATfuturaintlDOTcom>writes
Quote
Does anyone out there use the SET NOCOUNT ON option when using a
TADODatset?

TADODataset.CommandType := cmdText;

For instance;

SET NOCOUNT ON
SELECT *
FROM tmpCompanyProducts
WHERE CompanyProductsIndex IS NULL

Is this better than just;

SELECT *
FROM tmpCompanyProducts
WHERE CompanyProductsIndex IS NULL

Is there any benefit to this? I know that i include it in most of my
sproc's
just to eliminate the extra bits being passed back across the network.
Does
this have the same effect when using the TADODataset or TADOQuery?


Thanks for your time,

Brian


 

Re:Curiosity about TADODataset

I realize that it is only a couple of bytes but I was just wondering if
anyone else does this as an optimization technique? Every 'bit' counts,
right?
"Guillermo Castaņo A" <XXXX@XXXXX.COM>wrote in
message news:XXXX@XXXXX.COM...
Quote
SQL Server returns the number of rows affected for a Transact SQL
statement.
On SP executing a lot of statements it can generate a lot of extra
traffic,
not in a single SQL sentence.

--
Guillermo Castaņo A.
www.GrupoMillennium.com
"Brian Hollister" <bhollisterATfuturaintlDOTcom>writes
news:3faaa288$XXXX@XXXXX.COM...
>Does anyone out there use the SET NOCOUNT ON option when using a
TADODatset?
>
>TADODataset.CommandType := cmdText;
>
>For instance;
>
>SET NOCOUNT ON
>SELECT *
>FROM tmpCompanyProducts
>WHERE CompanyProductsIndex IS NULL
>
>Is this better than just;
>
>SELECT *
>FROM tmpCompanyProducts
>WHERE CompanyProductsIndex IS NULL
>
>Is there any benefit to this? I know that i include it in most of my
sproc's
>just to eliminate the extra bits being passed back across the network.
Does
>this have the same effect when using the TADODataset or TADOQuery?
>
>
>Thanks for your time,
>
>Brian
>
>