Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
as we can do in SQL how to pass datatable to oracle store proc

C#
OracleParameter[] parameter ={
                                              new OracleParameter("IN_UserRoleMapping",dt)
                                          };


SQL
create or replace
TYPE OBJ_USERROLEMAPPINGTYPE AS OBJECT 
( 
"RoleId" NUMBER

)

create or replace
TYPE USERROLEMAPPINGTYPE 
AS TABLE OF  OBJ_USERROLEMAPPINGTYPE;

create or replace
PROCEDURE USP_ADDEDILDELUSERMASTER
(
  
  IN_USERROLEMAPPINGTYPE  USERROLEMAPPINGTYPE
 
)
Posted

1 solution

To the best of my knowledge you cannot pass a (.NET) datatable to an Oracle Stored Procedure (remember .NET and SQL Server are from the same vendor, Oracle is not)

There are ways around it - you could transform the datatable into XML and pass that, or you could populate an actual table with the contents of the datatable and have your stored procedure act on that table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900