Page 1 of 1

oracle procedure (ref decimal - ref decimal?)

Posted: Mon 11 Oct 2010 12:50
by Daniel.Kania
Hello,
in my model are defined a oracle procedure:








and in :








When i now write:

using (Gem14Model.Gem14Entities mentity = new Gem14Model.Gem14Entities()) {
decimal test = 0;
mentity.Getnewbag(0, 0, 616, ref test);
}

an error occured: Fehler 102 4-Argument: kann nicht von "ref decimal" in "ref decimal?" konvertiert werden.

what's wrong?

And what is "decimal?" ???

thx, Daniel

Posted: Mon 11 Oct 2010 13:34
by AndreyR
"decimal?" is a short version of the "System.Nullable".
You can modify your code in the following way, for example:

Code: Select all

using (Gem14Model.Gem14Entities mentity = new Gem14Model.Gem14Entities()) { 
  decimal? test = 0; 
  mentity.Getnewbag(0, 0, 616, ref test); 
}
To obtain the decimal value, simply use the "test.Value" construct.

...

Posted: Tue 12 Oct 2010 07:26
by Daniel.Kania
so simple? fine!

thank you!