Error Type "OracleDbType.Clob" cannot be used in PL/SQL tabl

Error Type "OracleDbType.Clob" cannot be used in PL/SQL tabl

Postby amirela » Tue 26 Oct 2010 10:55

How can i use "OracleDbType.Clob" type with PL/SQL table?
Error: "Type "OracleDbType.Clob" cannot be used in PL/SQL table parameter"
amirela
 
Posts: 15
Joined: Tue 26 Oct 2010 10:51

Postby StanislavK » Wed 27 Oct 2010 16:29

Could you please describe the scenario you are trying to perform in more details?

Do you mean passing a PL/SQL table of Oracle LOBs into a stored procedure? Provided that you have declared the corresponding table type (say, 'LOB_TABLETYPE'), this can be done in the following way:
Code: Select all
// Register the corresponding table type in your application
OracleType lobtabletype = OracleType.GetObjectType("LOB_TABLETYPE", oracleConnection1);
// Create the table
OracleTable table = new OracleTable(lobtabletype);

// Populate the table
...

// Add this table as a parameter to an OracleCommand object.
oracleCommand1.Parameters.Add(new OracleParameter("p0", OracleDbType.Table));
oracleCommand1.Parameters[0].Value = table;

// Execute the command.
...

Please tell us if this helps.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle