G
Guest
I am calling an oracle procedure in a package. It is defined as
function get_request_status(request_id IN OUT number,
appl_shortname IN varchar2 default NULL,
program IN varchar2 default NULL,
phase OUT varchar2,
status OUT varchar2,
dev_phase OUT varchar2,
dev_status OUT varchar2,
message OUT varchar2) return boolean;
pragma restrict_references (get_request_status, WNDS);
My vb code is
cnn2.ConnectionString = "provider=MSDAORA; Data Source=" &
gDatabase & ";user id=" & gUserId & "; password=" & gPassword
cnn2.Open()
cmd2 = New OleDbCommand
cmd2.CommandType = CommandType.StoredProcedure
cmd2.CommandText = "fnd_concurrent.get_request_status"
cmd2.Connection = cnn2
Dim pRetVal As OleDbParameter = cmd2.Parameters.Add("pRetVal",
OleDbType.Boolean)
pRetVal.Direction = ParameterDirection.ReturnValue
Dim pRequestId As OleDbParameter =
cmd2.Parameters.Add("requestId", OleDbType.Numeric)
pRequestId.Direction = ParameterDirection.InputOutput
pRequestId.Value = Rdr("request_id")
Dim pShortName As OleDbParameter =
cmd2.Parameters.Add("application_short_name", OleDbType.VarChar)
pShortName.Direction = ParameterDirection.Input
pShortName.Value = Rdr("application_short_name")
Dim pPgm As OleDbParameter = cmd2.Parameters.Add("program",
OleDbType.VarChar)
pPgm.Direction = ParameterDirection.Input
pPgm.Value = Rdr("program")
Dim pPhase As OleDbParameter = cmd2.Parameters.Add("phase",
OleDbType.VarChar, 50)
pPhase.Direction = ParameterDirection.Output
pPhase.Value = RequestArray(Cnt).Phase
Dim pStatus As OleDbParameter = cmd2.Parameters.Add("status",
OleDbType.VarChar, 50)
pStatus.Direction = ParameterDirection.Output
pStatus.Value = RequestArray(Cnt).Status
Dim pDevPhase As OleDbParameter =
cmd2.Parameters.Add("dev_phase", OleDbType.VarChar, 50)
pDevPhase.Direction = ParameterDirection.Output
pDevPhase.Value = RequestArray(Cnt).DevPhase
Dim pDevStatus As OleDbParameter =
cmd2.Parameters.Add("dev_status", OleDbType.VarChar, 50)
pDevStatus.Direction = ParameterDirection.Output
pDevStatus.Value = RequestArray(Cnt).DevStatus
Dim pMessage As OleDbParameter = cmd2.Parameters.Add("message",
OleDbType.VarChar, 500)
pMessage.Direction = ParameterDirection.Output
pMessage.Value = RequestArray(Cnt).Message
Try
rc = cmd2.ExecuteNonQuery
Catch ex As Exception
MsgBox(Err.Description)
End Try
Cnt += 1
cmd2.Dispose()
cnn2.Close()
'lstJobs.Items.Add(RequestArray(Cnt).Name)
End
End While
I get an error stating 'Expression is of wrong type' and I can't figure out
why. Any help would be appreciated.
Thanks in advance.
function get_request_status(request_id IN OUT number,
appl_shortname IN varchar2 default NULL,
program IN varchar2 default NULL,
phase OUT varchar2,
status OUT varchar2,
dev_phase OUT varchar2,
dev_status OUT varchar2,
message OUT varchar2) return boolean;
pragma restrict_references (get_request_status, WNDS);
My vb code is
cnn2.ConnectionString = "provider=MSDAORA; Data Source=" &
gDatabase & ";user id=" & gUserId & "; password=" & gPassword
cnn2.Open()
cmd2 = New OleDbCommand
cmd2.CommandType = CommandType.StoredProcedure
cmd2.CommandText = "fnd_concurrent.get_request_status"
cmd2.Connection = cnn2
Dim pRetVal As OleDbParameter = cmd2.Parameters.Add("pRetVal",
OleDbType.Boolean)
pRetVal.Direction = ParameterDirection.ReturnValue
Dim pRequestId As OleDbParameter =
cmd2.Parameters.Add("requestId", OleDbType.Numeric)
pRequestId.Direction = ParameterDirection.InputOutput
pRequestId.Value = Rdr("request_id")
Dim pShortName As OleDbParameter =
cmd2.Parameters.Add("application_short_name", OleDbType.VarChar)
pShortName.Direction = ParameterDirection.Input
pShortName.Value = Rdr("application_short_name")
Dim pPgm As OleDbParameter = cmd2.Parameters.Add("program",
OleDbType.VarChar)
pPgm.Direction = ParameterDirection.Input
pPgm.Value = Rdr("program")
Dim pPhase As OleDbParameter = cmd2.Parameters.Add("phase",
OleDbType.VarChar, 50)
pPhase.Direction = ParameterDirection.Output
pPhase.Value = RequestArray(Cnt).Phase
Dim pStatus As OleDbParameter = cmd2.Parameters.Add("status",
OleDbType.VarChar, 50)
pStatus.Direction = ParameterDirection.Output
pStatus.Value = RequestArray(Cnt).Status
Dim pDevPhase As OleDbParameter =
cmd2.Parameters.Add("dev_phase", OleDbType.VarChar, 50)
pDevPhase.Direction = ParameterDirection.Output
pDevPhase.Value = RequestArray(Cnt).DevPhase
Dim pDevStatus As OleDbParameter =
cmd2.Parameters.Add("dev_status", OleDbType.VarChar, 50)
pDevStatus.Direction = ParameterDirection.Output
pDevStatus.Value = RequestArray(Cnt).DevStatus
Dim pMessage As OleDbParameter = cmd2.Parameters.Add("message",
OleDbType.VarChar, 500)
pMessage.Direction = ParameterDirection.Output
pMessage.Value = RequestArray(Cnt).Message
Try
rc = cmd2.ExecuteNonQuery
Catch ex As Exception
MsgBox(Err.Description)
End Try
Cnt += 1
cmd2.Dispose()
cnn2.Close()
'lstJobs.Items.Add(RequestArray(Cnt).Name)
End
End While
I get an error stating 'Expression is of wrong type' and I can't figure out
why. Any help would be appreciated.
Thanks in advance.