-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: CleverSylu
Message 1 in Discussion
Hi All,
I am new to ORACLE.
I wrote a stored procedure in Oracle for inserting to a table.
I am using Microsoft Application blocks for Database operations
When I am trying to execute that SP from my C# code I am getting this error.
Object must implement IConvertible.
Here is the procedure
CREATE OR REPLACE procedure P_RS_AddEmployee(
employeeId in varchar2,firstName in varchar2,lastName in archar2,businessTitle
in varchar2,address in varchar2,city in varchar2,countryId in int,stateId in
int,zipcode in varchar2,dob in date,workLocation in varchar2,reportingLocation
in varchar2,empStatusId in int,effectiveDate in date,dateofhire in date )as
begin
insert into TBL_RS_EMPMASTER
values(employeeId,firstName,lastName,businessTitle,address,city,countryId,stateId,zipcode,dob,workLocation,reportingLocation,empStatusId,effectiveDate,dateofhire);
\end;
Here is the C# Code
OracleParameter[] passParameter = new OracleParameter[15];
passParameter[0] = new OracleParameter"employeeId",OracleType.VarChar);
passParameter[0].Value = "abc";
passParameter[0].Direction = ParameterDirection.Input;
passParameter[1] = new OracleParameter("firstName",OracleType.VarChar);
passParameter[1].Value = "abc";
passParameter[1].Direction = ParameterDirection.Input;
passParameter[2] = new OracleParameter("lastName",OracleType.VarChar);
passParameter[2].Value = "abc";
passParameter[2].Direction = ParameterDirection.Input;
passParameter[3] = new OracleParameter("businessTitle",OracleType.VarChar);
passParameter[3].Value = "abc";
passParameter[3].Direction = ParameterDirection.Input;
passParameter[4] = new OracleParameter("address",OracleType.VarChar);
passParameter[4].Value = "abc";
passParameter[4].Direction = ParameterDirection.Input;
passParameter[5] = new OracleParameter("city",OracleType.VarChar);
passParameter[5].Value = "abc";
passParameter[5].Direction = ParameterDirection.Input;
passParameter[6] = new OracleParameter("countryId",OracleType.Int32);
passParameter[6].Value =1;
passParameter[6].Direction = ParameterDirection.Input;
passParameter[7] = new OracleParameter("stateId",OracleType.Int32);
passParameter[7].Value = 1;
passParameter[7].Direction = ParameterDirection.Input;
passParameter[8] = new OracleParameter("zipcode",OracleType.VarChar);
passParameter[8].Value = "abc";<o:p></o:p>
passParameter[8].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p> </o:p>
passParameter[9] = new
OracleParameter("dob",OracleType.DateTime);<o:p></o:p>
passParameter[9].Value =
DateTime.Now;//objEmployees.DOB;<o:p></o:p>
passParameter[9].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p> </o:p>
passParameter[10] = new
OracleParameter("workLocation",OracleType.VarChar);<o:p></o:p>
passParameter[10].Value = "abc";<o:p></o:p>
passParameter[10].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p> </o:p>
passParameter[11] = new
OracleParameter("reportingLocation",OracleType.VarChar);<o:p></o:p>
passParameter[11].Value = "abc";<o:p></o:p>
passParameter[11].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p> </o:p>
passParameter[12] = new
OracleParameter("empStatusId",OracleType.Int32);<o:p></o:p>
passParameter[12].Value = 1;<o:p></o:p>
passParameter[12].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p> </o:p>
passParameter[13] = new
OracleParameter("effectiveDate",OracleType.DateTime);<o:p></o:p>
passParameter[13].Value =
DateTime.Now;//objEmployees.EffectiveDate;<o:p></o:p>
passParameter[13].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p> </o:p>
passParameter[14] = new
OracleParameter("dateofhire",OracleType.DateTime);<o:p></o:p>
passParameter[14].Value =
DateTime.Now;//objEmployees.DateOfHire;<o:p></o:p>
passParameter[14].Direction =
ParameterDirection.Input;<o:p></o:p>
<o:p></o:p>
int flgSuccess = OracleHelper.ExecuteNonQuery("user
id=system;data
source=AMETEK;password=tiger","P_RS_AddEmployee",passParameter);<o:p></o:p>
<o:p> </o:p>
Please help me in this<o:p></o:p>
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]