Calling Oracle pkgs from asp.net page
Hi All,
I am trying to call a package (from oracle) from my asp.net page.
I'm trying to populate the data in a grid
Basically passing 2 values (constant values) to my procedure which is in the package.
But to test it i have created a form in vb.net and executing the same code on my button_click event.
My code is this:
-------------------
Private Sub btn_Get_EDI_Messages_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Get_EDI_Messages.Click
Dim dataMessage As New DataSet()
Dim myDataAdapter As New System.Data.OleDb.OleDbDataAdapter()
Dim sCentreNo As String = "50703"
Dim nCentreType As String = "2"
With myDataAdapter
Try
.SelectCommand() = New System.Data.OleDb.OleDbCommand("{call pk_eie_getedimessages.pr_get_message_logs(?,{resultset 100,p_emlo_id,p_emlo_file_name,p_emlo_file_extension,p_emlo_logged_date,p_emla_eaty_id})}", New System.Data.OleDb.OleDbConnection("Provider=MSDAORA.1;Password=EIE;User ID=EIE;Data Source=LIONCOPY"))
.SelectCommand.CommandType = CommandType.Text
.SelectCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("p_centre_number", System.Data.OleDb.OleDbType.VarChar, 7))
.SelectCommand.Parameters("p_centre_number").Value = sCentreNo
.SelectCommand.Parameters.Add(New System.Data.OleDb.OleDbParameter("p_centre_type", System.Data.OleDb.OleDbType.VarChar, 7))
.SelectCommand.Parameters("p_centre_type").Value = nCentreType
.Fill(dataMessage)
Catch
Dim s As String = Err.Description
s = s
Finally
If Not .SelectCommand Is Nothing Then
If Not .SelectCommand.Connection Is Nothing Then
.SelectCommand.Connection.Dispose()
End If
.SelectCommand.Dispose()
End If
.Dispose()
End Try
End With
Dim sOutput As String = dataMessage.GetXml
sOutput = sOutput
Me.DataGrid1.SetDataBinding(dataMessage, "table")
End Sub
No compilation errors.
but when i try to catch the error in a variable this is the mesg it shows:
"No error Information Available:DN-E-BADORDINAL(0X80040E55)"
Is there anything wrong with the above syntax?
Also i would like to know if the above mentd. syntax is the right way for passing the input parameters while calling the package procedure.
The same code works with single parameter.
pls help.
Thanks,
Edna.