G
Guest
Hello
The stored Procedure is
CREATE OR REPLACE PACKAGE DEPARTMENT A
TYPE CURSOR_TYPE IS REF CURSOR
PROCEDURE GET_EMPS (I_DEPTNO IN NUMBER
O_RESULT_SET IN OUT CURSOR_TYPE)
END
CREATE OR REPLACE PACKAGE BODY DEPARTMENT A
PROCEDURE GET_EMPS (I_DEPTNO IN NUMBER
O_RESULT_SET IN OUT CURSOR_TYPE
A
BEGI
OPEN O_RESULT_SET FO
select fac_no, fac_name from ams_ahrsadm.facility_table
END
END
The accessing code is
Dim oracleConn As New OracleConnection("Server=AIXHRPROD.bcps.org;Uid=ams_webuser;Pwd=amsviaweb"
Tr
oracleConn.Open(
Catch ex As Exceptio
End Tr
myCmd.Connection = oracleCon
myCmd.CommandText = "DEPARTMENT.GET_EMPS
myCmd.CommandType = CommandType.StoredProcedur
myCmd.Parameters.Add(New OracleParameter("I_DEPTNO", OracleType.Number)).Value =
myCmd.Parameters.Add(New OracleParameter("O_RESULT_SET()", OracleType.Cursor)).Direction = ParameterDirection.Outpu
Dim oDA As New OracleDataAdapter(myCmd
Tr
oDA.Fill(ds
Catch ex As Exceptio
End Tr
The error is
Referenced object has a value of 'Nothing'
All objects in my application code are not nothing
Suggestions
The stored Procedure is
CREATE OR REPLACE PACKAGE DEPARTMENT A
TYPE CURSOR_TYPE IS REF CURSOR
PROCEDURE GET_EMPS (I_DEPTNO IN NUMBER
O_RESULT_SET IN OUT CURSOR_TYPE)
END
CREATE OR REPLACE PACKAGE BODY DEPARTMENT A
PROCEDURE GET_EMPS (I_DEPTNO IN NUMBER
O_RESULT_SET IN OUT CURSOR_TYPE
A
BEGI
OPEN O_RESULT_SET FO
select fac_no, fac_name from ams_ahrsadm.facility_table
END
END
The accessing code is
Dim oracleConn As New OracleConnection("Server=AIXHRPROD.bcps.org;Uid=ams_webuser;Pwd=amsviaweb"
Tr
oracleConn.Open(
Catch ex As Exceptio
End Tr
myCmd.Connection = oracleCon
myCmd.CommandText = "DEPARTMENT.GET_EMPS
myCmd.CommandType = CommandType.StoredProcedur
myCmd.Parameters.Add(New OracleParameter("I_DEPTNO", OracleType.Number)).Value =
myCmd.Parameters.Add(New OracleParameter("O_RESULT_SET()", OracleType.Cursor)).Direction = ParameterDirection.Outpu
Dim oDA As New OracleDataAdapter(myCmd
Tr
oDA.Fill(ds
Catch ex As Exceptio
End Tr
The error is
Referenced object has a value of 'Nothing'
All objects in my application code are not nothing
Suggestions