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?
Our community of experts have been thoroughly vetted for their expertise and industry experience.