Check if query exceeds 16 table limit 
Author Message
 Check if query exceeds 16 table limit

Hi
I have a dialog where the user can create a query dynamically. Before
executing the query I want to check if this query exceeds the 16 table
limit of SQL-Server. I tried that with calling:
SET NOEXEC ON
execute my query
SET NOEXEC OFF

The problem is that if the query exceeds the 16 table limit the connection
is broken.

Can anybody give me a hint how I can check my query without breaking the
connection ?

Thanks
Thomas



Fri, 03 Mar 2000 03:00:00 GMT
 Check if query exceeds 16 table limit

Have you tried executing SQLPrepare on the SQL statement first?

Quote:
>Hi
>I have a dialog where the user can create a query dynamically. Before
>executing the query I want to check if this query exceeds the 16 table
>limit of SQL-Server. I tried that with calling:
>SET NOEXEC ON
>execute my query
>SET NOEXEC OFF

>The problem is that if the query exceeds the 16 table limit the
connection
>is broken.

>Can anybody give me a hint how I can check my query without breaking the
>connection ?

>Thanks
>Thomas



Sat, 11 Mar 2000 03:00:00 GMT
 Check if query exceeds 16 table limit

Hi Doug

Yes, I tried it but the connection will break too.
Do you have another hint ?



Quote:
> Have you tried executing SQLPrepare on the SQL statement first?
>  Thomas Drolshagen wrote in article


Quote:

> >Hi
> >I have a dialog where the user can create a query dynamically. Before
> >executing the query I want to check if this query exceeds the 16 table
> >limit of SQL-Server. I tried that with calling:
> >SET NOEXEC ON
> >execute my query
> >SET NOEXEC OFF

> >The problem is that if the query exceeds the 16 table limit the
> connection
> >is broken.

> >Can anybody give me a hint how I can check my query without breaking the
> >connection ?

> >Thanks
> >Thomas



Sun, 12 Mar 2000 03:00:00 GMT
 Check if query exceeds 16 table limit

Well, EM does not disconnect (or it reconnects magically after a
disconnect) so I cannot test your environment as such.  However, try
creating a stored procedure containing their query.  

create procedure xyzzySusername as
        all their stuff

The attempt to create a stored proc with more than 16 tables in a join will
also raise an error, the same error as attempting to execute the query.
Perhaps an error at this point would cause you less grief.  Doesn't hurt to
try. - Russell



Sun, 12 Mar 2000 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Error message exceeding limit of 16 tables/views

2. Error message exceeding limit of 16 tables/views

3. Exceed the limit of 16 tables!!!!!

4. view: exceed the limit of 16 tables

5. Maximum number of tables in a query (16) exceeded

6. ODBC Error: Query exceeds 16 tables

7. Maximum number of tables in a query (16) exceeded

8. 16 Table query limit

9. sybase limit of 16 on queries /tables

10. 16 Tables involved in query Limit

11. 16 Table limit in Query

12. 16 tables involved in a query limit


 
Powered by phpBB® Forum Software