|
-
May 7th, 2004, 02:54 AM
#1
Thread Starter
Addicted Member
*SOLVED* Oracle Data types and C#.NET
Hi,
Does anybody know what the equivalent data type in C# is for an oracle NUMBER value? I have tried all that I can think and I keep getting an ORA-06650 error (wrong number or types of arguments in call to 'IFSAPP.SALES_PART_API.GET_LIST_PRICE').
Code:
odc = new OleDbCommand();
odc.CommandText = "ifsapp.sales_part_api.get_list_price('" + sContract + "','" + sPartNo + "' )";
odc.CommandType = CommandType.StoredProcedure;
odc.Connection = odbIFS;
prm = new OleDbParameter("rv",OleDbType.Integer,25);
prm.Direction = ParameterDirection.ReturnValue;
odc.Parameters.Add(prm);
prm = new OleDbParameter("contract_",OleDbType.VarChar,5);
prm.Direction = ParameterDirection.Input;
prm.Value = sContract;
odc.Parameters.Add(prm);
prm = new OleDbParameter("part_no_",OleDbType.VarChar,25);
prm.Direction = ParameterDirection.Input;
prm.Value = sPartNo;
odc.Parameters.Add(prm);
odc.ExecuteNonQuery();
Hope somebody can help!?
Thanks,
DJ
Last edited by DJ_Catboy; May 7th, 2004 at 09:42 AM.
-
May 7th, 2004, 09:39 AM
#2
Addicted Member
If the procedure requires NUMBER parameters you do not need the single quotes.
Also isn't there a Oracle data provider; why are using oledb???
-
May 7th, 2004, 09:42 AM
#3
Thread Starter
Addicted Member
The Oracle library is only available in the 1.1 framework - I am still using 1.0..... however after looking at my code posted below I have found my problem! I have put the parameters in the command text which I should not have done!
Code:
odc.CommandText = "ifsapp.sales_part_api.get_list_price('" + sContract + "','" + sPartNo + "' )";
should be...
Code:
odc.CommandText = "ifsapp.sales_part_api.get_list_price";
Thanks for the help.,
DJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|