Hi,
why do I have a lot of
set fmtonly On, the sql phrase and then set fmtonly Off
example :
SET FMTONLY ON Select PROD_VAT_CODE From Product Where PROD_MANF_SKU =
'Q2477A#401'
SET FMTONLY OFF
I know that turning it on means retuns columns info with no data back. So it
is called when c alling A SP that has a simple T-SQL phrase as the example
in my trace in profilee and how can I disable so it will not be included in
the trace results
set fmtonly off%
Most probably your API (probably ADO) that wants to retrieve meta-data for the query before the
actual data is returned. I.e., a matter of how you are using ADO. I suggest you post to an ADO
group, including a small comment or slimmed-down-code-sample showing your current coding technique.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"SalamElias" <eliassal@.online.nospam> wrote in message
news:FCE31D96-46D0-4659-B4C0-DF95EEA53EE2@.microsoft.com...
> Hi,
> why do I have a lot of
> set fmtonly On, the sql phrase and then set fmtonly Off
> example :
> SET FMTONLY ON Select PROD_VAT_CODE From Product Where PROD_MANF_SKU =
> 'Q2477A#401'
> SET FMTONLY OFF
> I know that turning it on means retuns columns info with no data back. So it
> is called when c alling A SP that has a simple T-SQL phrase as the example
> in my trace in profilee and how can I disable so it will not be included in
> the trace results
> set fmtonly off%
>
|||SalamElias wrote:
> Hi,
> why do I have a lot of
> set fmtonly On, the sql phrase and then set fmtonly Off
> example :
> SET FMTONLY ON Select PROD_VAT_CODE From Product Where PROD_MANF_SKU =
> 'Q2477A#401'
> SET FMTONLY OFF
> I know that turning it on means retuns columns info with no data
> back. So it is called when c alling A SP that has a simple T-SQL
> phrase as the example
> in my trace in profilee and how can I disable so it will not be
> included in the trace results
> set fmtonly off%
I've seen the problem in Delphi client applications that use ADO. When
you discover how to turn it off in your code (regardless of what you
wrote it in), please post the solution here so I can inform my
colleagues.
Thanks.
David Gugick
|||I never do any manipulation using the set fmtonly. It is a straight forward
asp ADO code
(open conn, give it a T-SQL or a stored procedure, populate parameters and
get back the result using a dataset or call execute methode.
For the T-SQL I gave as an example, her is the relevant piece of code :
objConn.Open "Provider=SQLOLEDB;Password=user;Persist Security Info=True; _
User ID=user;Initial Catalog=PETC;Data Source=myserver"
cmdSQL.ActiveConnection = objConn
Then I have a record set which I loop through, in the loopi Execute the
following
sstrsql = "Select PROD_VAT_CODE From Product Where PROD_MANF_SKU = '" &
OrderForm.items(i)("SKU") & "'"
cmdSQL.CommandText = sstrsql
Set rsSKUVat = cmdSQL.Execute
"Tibor Karaszi" wrote:
> Most probably your API (probably ADO) that wants to retrieve meta-data for the query before the
> actual data is returned. I.e., a matter of how you are using ADO. I suggest you post to an ADO
> group, including a small comment or slimmed-down-code-sample showing your current coding technique.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "SalamElias" <eliassal@.online.nospam> wrote in message
> news:FCE31D96-46D0-4659-B4C0-DF95EEA53EE2@.microsoft.com...
>
>
|||Just out of curiousity, why are you persisting security info? Also,
there are a number of properties that you can set on the resultset and
command objects. Can you provide that information as well?
David Gugick
Imceda Software
www.imceda.com
SalamElias wrote:[vbcol=seagreen]
> I never do any manipulation using the set fmtonly. It is a straight
> forward asp ADO code
> (open conn, give it a T-SQL or a stored procedure, populate
> parameters and get back the result using a dataset or call execute
> methode.
> For the T-SQL I gave as an example, her is the relevant piece of code
> : ---
> objConn.Open "Provider=SQLOLEDB;Password=user;Persist Security
> Info=True; _ User ID=user;Initial Catalog=PETC;Data Source=myserver"
> cmdSQL.ActiveConnection = objConn
> Then I have a record set which I loop through, in the loopi Execute
> the following
> sstrsql = "Select PROD_VAT_CODE From Product Where PROD_MANF_SKU = '"
> & OrderForm.items(i)("SKU") & "'"
> cmdSQL.CommandText = sstrsql
> Set rsSKUVat = cmdSQL.Execute
> "Tibor Karaszi" wrote:
|||What do you mean by persisiting scurity info?Secondly, can you you indicate
the different parameters that are usefull to use in commands or datasets
Thanks a lot
"David Gugick" wrote:
> Just out of curiousity, why are you persisting security info? Also,
> there are a number of properties that you can set on the resultset and
> command objects. Can you provide that information as well?
> --
> David Gugick
> Imceda Software
> www.imceda.com
> SalamElias wrote:
>
>
|||Profiler and set fmtonly On issue|||Thanks for the info, but would you please can you you
indicate the different parameters that are usefull to use in commands
or datasets Thanks a lot
"David Gugick" wrote:
> SalamElias wrote:
>
> What parameters are you setting for the recordset object. Ther are
> settings for cursor location and type in particular.
> The persist is in your connect string as you posted it:
> objConn.Open "Provider=SQLOLEDB;Password=user; Persist Security
> Info=True; _
> User ID=user;Initial Catalog=PETC;Data Source=myserver"
> You should read about that option if you're not sure why it's there.
> From MSDN:
> "Remarks
> If Persist Security Info is set to False at the time the data source is
> initialized, the data source cannot persist sensitive authentication
> information. Furthermore, a call to a property that contains sensitive
> authentication information, such as a password, returns a default value
> instead of the actual password.
> After the data source has been uninitialized, sensitive information that
> was set when the data source was initialized with the Persist Security
> Info property set to False still cannot be obtained from the Properties
> collection or by persisting the uninitialized data source object.
> However, new properties set after the data source object has been
> uninitialized can be persisted or obtained if Persist Security Info is
> set to True.
> Before the data source is initialized for the first time, sensitive
> information can be obtained from the Properties collection, and can be
> persisted, regardless of the setting of the Persist Security Info
> property. Therefore, sensitive applications should avoid passing
> uninitialized data source objects.
>
> Note The recommended method for connecting to an instance of Microsoft?
> SQL Server? 2000 is to use Windows Authentication mode."
>
>
> --
> David Gugick
> Imceda Software
> www.imceda
|||SalamElias wrote:
> Thanks for the info, but would you please can you you
> indicate the different parameters that are usefull to use in commands
> or datasets Thanks a lot
>
Can you post what you are using please.
Generally, with ADO, I like to use forward-only, read-only, server-side
cursors. They are the fastest when minimal row processing on the client
is required. If you need to perform a lot of processing on each row in
the results, then I might move over to a client-side cursor just to get
the rows off the server more quickly.
David Gugick
Imceda Software
www.imceda.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment