|
Ohh Sorry,
thnxs for reply me.
I forgot to paste that lines . Now i applied that applied then another errors is coming.
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;
OracleCommand cmd = new OracleCommand("GETDATA", con);
cmd.CommandType = CommandType.StoredProcedure;
GET1 objget1 = new GET1();
GET2 objget2 = new GET2();
objget1.DEPTNO = 10;
objget1.DEPTNOIsNull = false;
//GET2[] get22 = null;
OracleParameter retval = new OracleParameter();
retval.OracleDbType = OracleDbType.Varchar2;
retval.ParameterName = "retval";
retval.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(retval);
OracleParameter inparam = new OracleParameter();
inparam.OracleDbType = OracleDbType.Object;
inparam.Direction = ParameterDirection.Input;
inparam.ParameterName = "id";
inparam.UdtTypeName = "GET1";
inparam.Value = objget1;
cmd.Parameters.Add(inparam);
OracleParameter outparam = new OracleParameter();
outparam.OracleDbType = OracleDbType.Object;
outparam.Direction = ParameterDirection.Output;
outparam.ParameterName = "data";
outparam.UdtTypeName = "GET2";
outparam.Value = objget2;
cmd.Parameters.Add(outparam);
con.Open();
cmd.ExecuteNonQuery();
Error like
"ORA-03113: end-of-file on communication channel\nProcess ID: 0\nSession ID: 20 Serial number: 25".
pls help.
|
|
|
|
|
Does a simple query work ?? i suspect this to be some connection problem. i have no other clue
|
|
|
|
|
Thanxs for reply,
Is any wrong in my code or functions code? then can u pls tell me a simple functions with object type parameters and c# code.
anil.
|
|
|
|
|
Hi,
I am trying to place month and year dropdownlists. it is possible or not.If possible how it is possible
|
|
|
|
|
Everything is possible, just use your imagination .
If you'd like to place month and year dropdownlists, isn't it better to use the dateTimePicker? This is all built in.
But if you don't want to use that, you can use the regular dropdownlist, it's called a combobox. You should play with the 'dropDownStyle' and you can just add items in there.
Good luck!
|
|
|
|
|
It's not even 9a.m. here and this abuse of the English language is just too hard to comprehend.
If you are refering to the standard System.Windows.Forms.DateTimePicker control, then there is a picklist out of the box for the month and cycle buttons for the year on the expanded view.
Otherwise I think you need to either give a code example or try to explain yourself a bit more clearly.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Dear All, I want to to develop an application based on vista style using c#.
is there any .dll file i have to import and work around with.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
How can I calculate the required length of a textBox to hold N characters please?
|
|
|
|
|
I dont think you can.. unless you know ahead of time what each character is going to be. A fair approximation would be 9xN since the default text is at 8.5 points. But this leave the box looking a bit "longer" than needed if it contains mostly "skinny" chars.
Consider these 10 char field widths:
OPOPOPOPOPO
itititititi
Perhaps if there is a setting that forces the character spacing to be equal - then you can certainly make a calculation.
---------------------------------------------
Help... I'm embedded and I can't get out!
If they don't get the basic research and learning skills down then they'll end up having a very hard life (Either that or they'll become managers) - Micheal P Butler
|
|
|
|
|
Well, very often you can't depending on the font. Monospaced fonts like Courier you could, but for most you'll find a 'W' quite a bit wider than an 'I'.
If you are using a monospaced font, you'd need to get a Graphics object, then call MeasureString (I think it is - or something like that). Which will tell you how wide a string is in pixels.
Regards,
Rob Philpott.
|
|
|
|
|
One way is, create a dummy label object(with AutoSize = true), assign the text to it. Use the labels width to set the TextBox's width
|
|
|
|
|
Many thanks to everyone who replied.
I like the dummy label idea - much appreciated.
|
|
|
|
|
Haii All,
CAn any one pls tell me how to export datatable values to the Excell...and also i have to export multiple datatable to multiple sheets in Excel..
Regards,
Venkateswaran.M.S
|
|
|
|
|
Look up Microsoft.Interop.Excel, System.Data.OleDb, the JET engine and read the forums a bit more thoroughly before posting such stuff.
There is a post asking for similar stuff on the ASP.NET forum, posted yesterday.
Though it's about getting data off of an Excel spreadsheet, but yourself, being a programmer, surely can figure out a way of putting it back in there.
Regards,
Greg
var question = (_2b || !(_2b));
|
|
|
|
|
I was just working on overloading the increment operator. I was hoping to have both pre-increment and post-increment. Unfortunately I see that the same method is called regardless of whether the operator is in pre- or post-position. So I checked the spec and was surprised to find:
"
Note that the operator returns the value produced by adding 1 to the operand, just like the postfix increment and decrement operators (§7.5.9), and the prefix increment and decrement operators (§7.6.5). Unlike in C++, this method need not, and, in fact, must not, modify the value of its operand directly.
"
What the heck good is an increment operator that doesn't increment?! If I want to do x += 1 I have the addition operator for that and it works just fine. I want x++ and ++x just like with the built-in numeric types; x = x++ or x = ++x would be ridiculous, but it appears that's all we're allowed.
Am I missing something? Does anyone have a work-around?
P.S. Or is just that it's 00:34 and I should go get some sleep? It seems to be working as expected somehow?
modified on Tuesday, February 24, 2009 2:33 AM
|
|
|
|
|
When calling the increment operator, the object is assigned a new reference, that reference has the new values.
Example. We have a class IntWrapper
public class IntWrapper
{
public int IntValue
{
get;
set;
}
} and we want to use it like this
IntWrapper a = new IntWrapper();
IntWrapper b = a;
a++;
Console.WriteLine("a = {0}, b = {1}", a.IntValue, b.IntValue); Here are two possible implementations for the increment operator overload in our class, the second is the correct way
public static IntWrapper operator ++(IntWrapper instance)
{
instance.IntValue++;
return instance;
}
public static IntWrapper operator ++(IntWrapper instance)
{
IntWrapper result = new IntWrapper();
result.IntValue = instance.IntValue + 1;
return result;
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Your first sentence appears to be on-topic, but I'm not sure of the relevence of the rest.
None of the three C# books I have give guidance on overloading the increment and decrement operators. MSDN doesn't seem to either.
The Microsoft and ECMA specifications merely say it's not like in C++ (as in the quote I posted), and that's no help to me because I only dabbled in C++.
In my case, I expected it to be difficult, but because it is actually simple, it became difficult and confusing to me. "Think our minds must be too highly trained, Majikthise." -- Vroomfondel
MSDN and mainstream books should explain how simple it is rather than expecting the reader to assume it is.
"
When overloading the increment and decrement operators, do not set the value; simply return the new value, the compiler will take care of setting the value and returning the new or old value as appropriate.
return ( x + 1 ) ;
return ( x = x + 1 ) ;
"
P.S. I just checked my Rational struct and I see that I have it correct there.
|
|
|
|
|
Yeah, the compiler takes care of it, and it is unexpectedly easy if you're using value types [structs]. If you're using reference types then how to implement it so the results are what's expected gets more tricky... see the posts below.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Huh? Both a and b refer to the same instance, so shouldn't a++ affect b?
[EDIT] You're right. I can see why that's happening (x++ is compiled down to x = IntWrapper.Increment(x)), and I guess it fits in with the semantics of the increment operator (operand changes to a new value), but it certainly is confusing when dealing with reference types.
modified on Tuesday, February 24, 2009 2:32 PM
|
|
|
|
|
I know - this is a wierd one. I thought more about it straight after I posted but didn't edit the post at all because I wanted to see what the reaction was to confirm what I thought, or to flame me down!
Personally, I would never use ++ or -- on reference types. It's not that obvious how it will affect things. Those operators are about changing values so I keep them for structs only.
The main rule I leaned about operator overloading is if it's not 100% obvious what something will do and affect other objects - either document it very clearly or don't do it!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I don't hold myself responsible for any post I make after 7 pm.
|
|
|
|
|
|
I try not to wake up before 10AM but sure, whatever
(Actually for this entire year so far I have been up at 6 on work days which sucks)
|
|
|
|
|
hi,
how i can create a 2d graph in c# like the performance graph in the task manager?
|
|
|
|