listing contents of Store Procedures?

  • ... unless you can tell us what you are trying to do... maybe there's an alternative slution to your problem!!

  • Basically, I've made a program that lists all the databases on my server,  and when I click on a table in my list it goes away and lists all the stored procedures that use that table and displays the SP's in a text box. Thanks for all the help you've given me

  • Sounds about right...

    The only problem with that solution is that sysdepends is not reliable.  I can garantee that you miss a few refferences with your current code.

     

    The alternative is to scan syscomments and try to manually match the dependancies... but that ain't bullet proof either .

     

    I'll leave you with that... unless you have other questions or ideas!!

  • Many thanks for all your assistance. you've been a great help and I think I've lean't stuff along the way

  • Happy to have almost helped .

  • i prefer to simply catch the results of sp_helptext PROCNAME into a recordset, and print hte results from that;

    Sub a()

        Dim sql As String

        Dim rs5 As ADODB.Recordset

        Set rs5 = New ADODB.Recordset

                sql = "EXEC SP_HELPTEXT 'Client'" Set rs5 = MyCn.Execute(sql)

                

                  

    Do While Not rs5.EOF

    Debug.Print rs5(0)

    rs5.MoveNext

    Loop

    Debug.Print "GO" & vbCrLf

    End Sub

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 6 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic. Login to reply