SQLServer Fmtonly and ADO

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Gyuria (Gyuria_at_discussions.microsoft.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 05:45:02 -0800

Hello!

ADO uses FMTONLY ON to get metadata from sql server. Recursive stored
procedures will fail with "Maximum stored procedure, function, trigger, or
view nesting level exceeded (limit 32)".
Errors generated when FMTONLY is ON will be ignored by ADO, but the
transaction will be rolled back.
Is it possible to get rid of this metadata checking?

SQL Server 2000 SP3, MDAC 2.8

Thanks,

Attila Gyuri
SQL Server MCP

Here is a simple script to reproduce the problem:

set fmtonly off

GO

drop procedure fmttest

GO

create procedure fmttest
as

if 1 = 0
begin
        --this won't be invoked except when FMTONLY is ON
        exec fmttest
end

GO

set fmtonly off
        --this will be OK
        exec fmttest
set fmtonly on
        --this will cause "Maximum stored procedure, function, trigger, or view
nesting level exceeded (limit 32)"
        exec fmttest
set fmtonly off



Relevant Pages

  • Re: How to Mimic Access Externally Linked Tables using ADO?
    ... > using SQL Server for efficiency reasons. ... > connection up programmatically using ADO or ADOX or some SQL Server API? ... >> newsgroup, but if you have a good reason to send me e-mail, you'll find ... ADO does not have a query engine. ...
    (microsoft.public.data.ado)
  • Re: How to access the SQL server express from mfc application?
    ... There are different ways to do this via MFC. ... You could certainly try ADO, ... the entire contents of the database to a SQL Server Standard Server. ...
    (microsoft.public.vc.mfc)
  • Re: DAO vs ADO
    ... and ADO when working with SQL Server data. ... which makes DAO a good choice. ... > add additional overhead by loading Jet, ...
    (microsoft.public.access.conversion)
  • Re: DAO vs ADO
    ... and ADO when working with SQL Server data. ... which makes DAO a good choice. ... > add additional overhead by loading Jet, ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Access and processor usage
    ... "increased bandwidth" using ADO. ... bottleneck - need to step up to Sql Server. ... If the data fits into a 2 GB database file, ...
    (comp.databases.ms-access)