Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Unable to execute DBMS_DATAPUMP.ADD_FILE

Unable to execute DBMS_DATAPUMP.ADD_FILE

From: sjoshi <sjoshi_at_ingr.com>
Date: 20 Jan 2007 10:11:15 -0800
Message-ID: <1169316675.874615.118920@q2g2000cwa.googlegroups.com>


Hello All
I'm unable to use the ADD_FILE procedure from .NET. I can seem to get others to work but I think I'm passing arguments incorrecty. The message I get is:

Message: ORA-06550: line 1, column 15:
PLS-00306: wrong number or types of arguments in call to 'ADD_FILE' ORA-06550: line 1, column 7:

These are the arguments to be passed:

/*ParameterName: HANDLE
Direction: Input
OleDbType: Decimal
ParameterName: FILENAME
Direction: Input
OleDbType: Varchar2
ParameterName: DIRECTORY
Direction: Input
OleDbType: Varchar2
ParameterName: FILESIZE
Direction: Input
OleDbType: Varchar2
ParameterName: FILETYPE
Direction: Input
OleDbType: Decimal, KU$_FILE_TYPE_DUMP_FILE CONSTANT BINARY_INTEGER := 1*/

//This is what I tried:
//code snippet

OracleDecimal odec = new OracleDecimal(jobHandle); OracleDecimal odecFileType = new OracleDecimal(1);

cmd.CommandText = "DBMS_DATAPUMP.ADD_FILE";

cmd.Parameters.Add("HANDLE", OracleDbType.Decimal, ParameterDirection.Input).Value = odec.Value; cmd.Parameters.Add("FILENAME", OracleDbType.Varchar2, ParameterDirection.Input).Value = dumpFile; cmd.Parameters.Add("DIRECTORY", OracleDbType.Varchar2, ParameterDirection.Input).Value = dumpDirObj; cmd.Parameters.Add("FILESIZE", OracleDbType.Varchar2, ParameterDirection.Input).Value = string.Empty; cmd.Parameters.Add("FILETYPE", OracleDbType.Decimal, ParameterDirection.Input).Value = odecFileType.Value;

cmd.ExecuteNonQuery();

Any hints are greatly appreciated.

thanks
Sunit Received on Sat Jan 20 2007 - 12:11:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US