Is it possible to move an Oracle null input parameter to a stored procedure
I have a stored procedure taking 3 inputs and 1 output of donne. I use the Oracle parameter to add all the input parameters 3 as follows:OracleParameter = cmd inobj. Parameters.Add ("wid", OracleDbType.Int32, 50);
inobj. Direction = ParameterDirection.Input;
inobj. Value = _employeeID;
and the addition of the setting of output as follows:
OracleParameter outobj is _cmd. Parameters.Add ("w_first", OracleDbType.Varchar2, 50);
outobj. Direction = ParameterDirection.Output;
On the side of the user interface, the user has the option of providing 1 entry or all inputs or any 2 based on his interest. Stored proc looks like this:
SP (inp1 in parameter, inp2 in inp3 in parameter, parameter, out parameter output1)
If I just get 1 or 2 entries of the user, it is very good query output data using the same stored procedure or do I create stored procedures for each scenario (combination of different entries)?
I get an error in pl/sql which indicates the invalid number of arguments?
Maybe I can be more clear with c# code. :)
void SaveSomethingInOracle(int param1, string param2 = null, decimal? param3 = null)
{
// Set up your oracle connection and query here
OracleParameter inobj = _cmd.Parameters.Add("w_id", OracleDbType.Int32,50);
inobj.Direction = ParameterDirection.Input;
inobj.Value = param1;
OracleParameter inobj2 = _cmd.Parameters.Add("name", OracleDbType.Varchar2,50);
inobj2.Direction = ParameterDirection.Input;
inobj2.Value = param2;
OracleParameter inobj3 = _cmd.Parameters.Add("quantity", OracleDbType.Decimal,50);
inobj3.Direction = ParameterDirection.Input;
if (param3.HasValue)
{
inobj3.Value = param3.Value;
}
else
{
inobj3.Value = null;
}
}
This c# method takes 3 parameters. The first is necessary, the other two are optional. If you do not set them, they take the value default null and passing it to the database. If you want to set the first and third only, you can still pass null as the other. If you have this piece of code to call the stored procedure any combination of parameters that you use, and the proc will get values or NULL values properly.
Hope he says. You need only one together code to do what you want to do. :)
Published by: Tridus on December 19, 2012 12:10
Tags: Database
Similar Questions
-
The Null value as the default value for an input to a stored procedure parameter
Hello
How can we set the default values with the NULL value for the parameter in a stored procedure.
As described above if I want to delete only the functioningcreate or replace procedure emp_proc ( p_test_input in varchar2 p_emp_id in number, p_emp_name in varchar2, p_manager_id in number ) as begin if ( upper ( p_test_input ) = 'I' ) then insert into emp values ( p_emp_id ,p_emp_name ,p_Manager_id,sysdate ); elsif ( upper ( p_test_input ) = 'D' ) then delete from emp where emp_id = p_emp_id; else dbms_output.put_line ( 'Please input ''A'' for ADD or ''D'' Delete EMPLOYEE' ); end if; end;
I want to call this procedure without pass additional parameters.
Published by: Rede on May 28, 2010 12:21EXECUTE emp_proc('D',1010);
Published by: Rede on May 28, 2010 12:22create or replace procedure emp_proc ( p_test_input in varchar2, p_emp_id in number, p_emp_name in varchar2 default null, p_manager_id in number default null )
-
Is it possible to move the menu button in the new interface?
I find the idea of the right terrible menu. Is it possible to move the button previous position or at least to the left?
Install Stylish for Firefox https://addons.mozilla.org/de/firefox/addon/stylish/ .
Create a new style under modules-> User Styles and copy the following text in the largest of the three boxes:
@namespace url ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@-moz - document url ("chrome://browser/content/browser.xul") {}
#PanelUI-button, #customization-panel-container,
#customization-panelWrapper .panel-arrow,
#ctr_panelui-button,
#wrapper-ctr_panelui-button {
-moz-box-ordinal-group: 0
}
#PanelUI-button {
background-position: 100% 0, calc(100% - 1px) 0, calc(100% - 2px) 0;
}
}
End of the text (do not copy this line). ############
Save and restart. The button should now be on the left.
-
Lenovo P70 - Has: possible to move applications to the SD card?
Hello! I intend to buy this phone this month. Is it possible to move applications to the SD card? I read several contradictory reviews of sites and users. Please notify. Thank you!
-
I can move emails from one folder to another, but is it possible to move an entire folder to another folder?
Hello
I'm sorry, but we cannot help you with Hotmail issues in this Feedback Forum for answers
Please repost your question in Hotmail in the Hotmail Forums the link below
http://windowslivehelp.com/product.aspx?ProductID=1
ForumsConsult with Microsoft Certified Solutions____________________________________________For the different Forums for Windows Live Applications, select the link belowWelcome to Windows Live Solution Center -
I use windows Vista that is installed on drive C: (OS) year 80 gig hard drive plus I also drive D: (DATA) one new secondary 320 gig hard drive installed. I want to use the system more effectively by saving and store my files on this hard drive automatically is it possible to move my profile of the user of the c:, d: and reserving my main drive for the OS only
There are instructions of third party to do so, but this is not supported by MS and can cause problems
Maybe redirect Documents libraries on the D drive
-
Is it possible to move my SSD in AHCI mode without having to reinstall Windows 7?
Before installing Windows 7, I entered the BIOS and changed my AHCI Mode IDE SDS for a reason any and I forgot to switch back. Now, I want to put in AHCI mode because it says online that AHCI mode could improve SDD/HDD performance considerably, compared to IDE mode. However, if the mode is enabled in AHCI mode, my Windows 7 will not able to start, so I continue to choose the IDE for my SDS mode.
Is it possible to move my SSD in AHCI mode without having to reinstall Windows 7? Or is it really useful to change the return method? I have no hard drives except an SSD in my computer.
See how you go with the options below-
https://support.Microsoft.com/kb/922976?WA=wsignin1.0
Be sure that set you the BIOS to AHCI again on restart.
-
Is it possible to move from win 7 Home Basic for win 7 premium version?
Is it possible to move from win 7 Home Basic for win 7 premium version
Original title: win 7 upgrade
No, anytime updates are available for most (but not all) Win7 Starter, Win7 Home Premium & Professional Win7 computers. See http://windows.microsoft.com/en-US/windows7/help/videos/upgrade-to-another-edition-of-windows-7-by-using-windows-anytime-upgrade
Windows Update has nothing to do with the upgrade of Windows. Please post future questions about upgrading a Win7 computer in this forum: http://answers.microsoft.com/en-us/windows/forum/windows_install-windows_7
-
Is it possible to move the Windows 8 Camera Roll folder?
Is it possible to move the film folder in Windows 8, or change the folder in which are recorded the photos and videos taken with the camera application? I wish I had the folder is synchronized to SkyDrive Desktop on my SkyDrive.
I FOUND THE SOLUTION!
I know how frustrating this may be so I hope this helps you guys!
So I tried to upload a VIDEO to YouTube of my PC but I could not find the files under the my videos folder BECAUSE it was recorded on film! I couldn't find a way to get videos of the FILM at my local / PC video files to download the clip on YouTube. So that's what I did:
Click on the windows downstairs tap left
Find a CAMERA ROLL VIDEO and ENTER
You should be directed to a page with all your videos on the LEFT
Right CLICK on the video you want to down click COPY the FILE
then navigate to the folder of you videos and paste there
your video should be ready to be uploaded to YouTube, Facebook Etc.
I hate this version of windows so COMPLICATED for WHAT please arrrgg
Guilbert lovelies!
-
Original title: Windows speech recognition
is it possible to move my personal words and phrases that I recorded on my recognition of Windows to another computer? If so, how?
is it possible to move my personal words and phrases that I recorded on my recognition of Windows to another computer? If so, how?
Search the Windows speech recognition profile tool.
. See screenshot below. Marty
-
Hello, is it possible to animate the pictures? In particular, is it possible to move a character to a photo/image?
You will need to do a clean selection of figure and copy it to a new layer (and rebuild what was behind it). If you want to animate the figure, you will need several layers (one for each position) and you could change the position of the arms, legs and head with deformation of the puppet. Once you have the parts, can create an animation of image.
-
Is it possible to move/transfer video with the movement?
Hi all
is it possible to transfer the video/image after applying this movement in terms of position?
for example I hosted a video/picture depending on the position from left to right, now I want to move/transfer the same video/image down, and applied movement. is it possible to move the image to the bottom without selecting all the keyframes in the effect control?
concerning
Yes, the effects for the video Panel, adjust the position of the anchor.
MtD
-
Is it possible to move PDF files from the clouds of document to dropbox
Is it possible to move or drag a PDF document cloud directly to dropbox?
I don't want to download the PDF of DC files to my computer and then upload to dropbox.
Hi jay,
I'm sorry, it will not possible to move files PDF of the Document cloud to the drop box. However you can open the file saved on cloud of Document, select Save as in the file menu & click on tab of Dropbox to save the file to the Dropbox account.
Kind regards
Nicos -
Hello
I'm new to BC. You want to create several blogs different style from my BC account. The problem is - overall layout of the blog seems to be common to all possible blogs.
Is it possible to move the contents of the layout of the overall blog in a custom template file (*.tpl)? (The idea is to create separate TPLS to different blogs)
If so, what tag (which makes use of TPL file) can be used to display the overall content of blog?
Thank you!
It is a plan that is not called by a module, so no, you can't make that models like the one for the overal layout.
-
Is it possible to move the button publish online?
< a bit cranky person who had no coffee yet >
Is it possible to move the button to publish online? It is just about things there that I use often and when I'm in a hurry and my cursor exceeds their I have to wait for this massive box to publish online (Preview) to disappear. I don't want to publish online. I don't want to listen to extracts or learn more. I'll probably NEVER click on this button. I would not lose so much time waiting for this stupid expires box.
< / a little grumpy person who had no coffee yet >
Thanks in advance for your suggestions.
Change your preferences. Under Technology Preview, turn the power off.
Maybe you are looking for
-
iTunes can't sync music only after that I have change my id
iTunes can't sync music only after that I have change my ID?
-
I have a laptop Acer Aspire 5738ZG and need to clean the fan. Where I connect the ESD wrist strap to the land of my self and avoid damage to the computer inside.
-
Example: Pavilion s5123w: update information
Ive updated my HP Slimline s5123w-card mother m2n68 - la. With a 380 Watt power supply - 4 GHz Ram - AMD Athlon64x2 7850 Kuma 2.80 GHz Dual Core Black edition processor. And my os is win.10 64 bit does anyone know if I can install 8 GHz of Ram and ge
-
I have 4 Sony Nfc tags but unfortunately, I was with another Nfc tag application and by mistake one of the tag (tag car) has been removed and now it is not detected by Sony smart app. Is it possible to reprogram the default settings of Sony tag Nfc p
-
Lost all files in Windows, do I need to reinstall Windows?
I have performed in a bad way, as backup of the laptop and I lost all files in windows. Any program of Microsoft works. just internet. Is there a way to recover these files or do I have to re - install windows 7? Thank you.