Click here to Skip to main content
15,918,193 members
Home / Discussions / C#
   

C#

 
GeneralRe: Execute a *.bat file in C# project Pin
ABitSmart24-Feb-09 0:45
ABitSmart24-Feb-09 0:45 
NewsRe: Execute a *.bat file in C# project Pin
CodingLover24-Feb-09 1:32
CodingLover24-Feb-09 1:32 
QuestionRetrieve Images from Databse Pin
Najmal23-Feb-09 21:34
Najmal23-Feb-09 21:34 
AnswerRe: Retrieve Images from Databse Pin
Mycroft Holmes23-Feb-09 21:53
professionalMycroft Holmes23-Feb-09 21:53 
QuestionPipes! and they aint for smoke'n Pin
Mel Feik23-Feb-09 21:16
Mel Feik23-Feb-09 21:16 
AnswerRe: Pipes! and they aint for smoke'n Pin
Rob Philpott23-Feb-09 22:07
Rob Philpott23-Feb-09 22:07 
GeneralRe: Pipes! and they aint for smoke'n Pin
Mel Feik24-Feb-09 5:59
Mel Feik24-Feb-09 5:59 
QuestionHow to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
AnilJayanti23-Feb-09 21:14
AnilJayanti23-Feb-09 21:14 
Hi,

I'm facing the problem when i'm executing the oracle function with input and output parameters which are object type.

i givng my code below.

I created two types for input and output parameter for a functions.

type get1 as object(deptno number(5))NOT FINAL;

TYPE GET2 AS OBJECT(DNAME VARCHAR2(14),LOC VARCHAR2(13))NOT FINAL;

///Function code :

function getdata(id in get1,data out get2)
return varchar2 is retval varchar(10); begin
select get2(dname,loc) into data from dept where deptno = get1.deptno;
retval := 'Result'; return retval; end;

///My .net code :

OracleConnection con = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.3)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORACLE)));User Id=scott;Password=tiger");

OracleCommand cmd = new OracleCommand("getdata", con);
cmd.CommandType = CommandType.StoredProcedure;

GET1 objget1 = new GET1();
GET2 objget2 = new GET2();

objget1.DEPTNO = 10;
GET2[] get22 = null;


OracleParameter outparam = new OracleParameter();
outparam.OracleDbType = OracleDbType.Object;
outparam.Direction = ParameterDirection.Output;
outparam.ParameterName = "data";
outparam.UdtTypeName = "GET2";
outparam.Value = objget2;


OracleParameter inparam = new OracleParameter();
inparam.OracleDbType = OracleDbType.Object;
inparam.Direction = ParameterDirection.Input;
inparam.ParameterName = "id";
inparam.UdtTypeName = "GET1";
inparam.Value = 10;

con.Open();
cmd.ExecuteNonQuery();

when i'm executing the below error is coming.

"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'GET_DATA_NEW'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored"

Pls help me.
AnswerRe: How to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
Nagy Vilmos23-Feb-09 22:03
professionalNagy Vilmos23-Feb-09 22:03 
AnswerRe: How to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
ABitSmart23-Feb-09 22:07
ABitSmart23-Feb-09 22:07 
GeneralRe: How to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
AnilJayanti23-Feb-09 22:40
AnilJayanti23-Feb-09 22:40 
GeneralRe: How to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
ABitSmart23-Feb-09 22:57
ABitSmart23-Feb-09 22:57 
GeneralRe: How to use user-defined-type input and output parameters in Oracle Function using ODP.NET Pin
AnilJayanti23-Feb-09 23:07
AnilJayanti23-Feb-09 23:07 
QuestionHow to place dropdownlist in the header of the calender control Pin
P G Kishore23-Feb-09 21:11
P G Kishore23-Feb-09 21:11 
AnswerRe: How to place dropdownlist in the header of the calender control Pin
Deresen23-Feb-09 21:56
Deresen23-Feb-09 21:56 
AnswerRe: How to place dropdownlist in the header of the calender control Pin
Nagy Vilmos23-Feb-09 21:59
professionalNagy Vilmos23-Feb-09 21:59 
Questionenable vista syle application in c# Pin
Abdul Rahman Hamidy23-Feb-09 20:56
Abdul Rahman Hamidy23-Feb-09 20:56 
AnswerRe: enable vista syle application in c# Pin
Greg Chelstowski23-Feb-09 21:31
Greg Chelstowski23-Feb-09 21:31 
QuestionCalculate length of textBox for N number of characters Pin
kanchoette23-Feb-09 20:54
kanchoette23-Feb-09 20:54 
AnswerRe: Calculate length of textBox for N number of characters Pin
Mel Feik23-Feb-09 21:38
Mel Feik23-Feb-09 21:38 
AnswerRe: Calculate length of textBox for N number of characters Pin
Rob Philpott23-Feb-09 22:02
Rob Philpott23-Feb-09 22:02 
AnswerRe: Calculate length of textBox for N number of characters Pin
ABitSmart23-Feb-09 22:14
ABitSmart23-Feb-09 22:14 
GeneralRe: Calculate length of textBox for N number of characters Pin
kanchoette23-Feb-09 22:21
kanchoette23-Feb-09 22:21 
QuestionExporting Multiple Sheets in Excel Pin
venkateswaran0223-Feb-09 20:30
venkateswaran0223-Feb-09 20:30 
AnswerRe: Exporting Multiple Sheets in Excel Pin
Greg Chelstowski23-Feb-09 21:34
Greg Chelstowski23-Feb-09 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.