troubleshooting Question

Retrieve Stored Procedure Text

Avatar of rocky050371
rocky050371 asked on
.NET ProgrammingVisual Basic.NET
6 Comments1 Solution407 ViewsLast Modified:
I have the following which lists a set of available SPs

    If Not ucProvider.SelectedRow Is Nothing Then
            Cursor = Cursors.WaitCursor
            Try

                ucProcedure.Enabled = True
                Dim cn As New OleDbConnection(_connectionMgr.Item(_callback.CallConnID).ConnConnectionString)

                Using cn
                    cn.Open()

                    Dim dt = cn.GetOleDbSchemaTable(OleDbSchemaGuid.Procedures, New Object() {Nothing, Nothing, Nothing, Nothing})

                    ugParameters.DataSource = Nothing
                    ucProcedure.DataSource = Nothing
                    ucProcedure.DataSource = dt
                    ucProcedure.ValueMember = "PROCEDURE_NAME"


                End Using
                Cursor = Cursors.Default
            Catch ex As Exception
                LogException(ex)
            End Try
        Else
            MessageBox.Show("Please select a provider.", "Database Callback", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If

How do I retrieve the actual stored produce code, so the user can view the contents of the SP?
ASKER CERTIFIED SOLUTION
John Claes
Senior .Net Consultant & Technical Analist

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros