Re: how to know the table is exist in the database




"Mark Rae" <mark@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ugQwWJU2FHA.3156@xxxxxxxxxxxxxxxxxxxxxxx
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:%23PtLXwT2FHA.896@xxxxxxxxxxxxxxxxxxxxxxx
>
>> Actually, executing sp_tables stored procedure is better since sysobjects
>> structure or accesibility might change at some point.
>
> LOL! As might the sp_tables stored procedure... :-)

No, AFAIK it isn't recommended accessing sysobjects directly because it
might really change while stored procedures such as sp_tables will still
accept same parameters and will yield same output.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


.



Relevant Pages

  • RE: syntax to print list of SPs
    ... select name from sysobjects where type='u' ... For Stored Procedure ... "Vyshnavi" wrote: ... > This query will give you the objects shipped by Microsoft during installation. ...
    (microsoft.public.sqlserver.programming)
  • Re: Return Results of sp_helptext via ADO
    ... 'basic sql for getting stored procedure text ... strSQLStoredProcBase = "select syscomments.text From sysobjects, ... then loop through recordset, appending row to prvious: ...
    (microsoft.public.data.ado)
  • Re: Renaming Stored Prcedures via EM
    ... Internally SQL Server keeps the stored procedure name in two places. ... Database object names are in table called sysobjects. ... stored in syscomments. ...
    (microsoft.public.sqlserver.programming)
  • Re: Stored procedure to check the syntax of stored procs, views, ...
    ... I use a stored procedure called sp_grep. ... syscomments table and look for references to your target string. ... user functions, views, etc. that contain a reference to this object. ... Since you're looping through sysobjects, you can filter out any object ...
    (microsoft.public.sqlserver.programming)
  • Re: get stored procedure structure
    ... AFAIK no "built-in ADO.NET support" but you can always select directly from ... > is it possible to get stored procedure from sql server? ...
    (microsoft.public.dotnet.framework.adonet)