473,799 Members | 3,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get a c# DateTime accepted into an Oracle stored procedure

2 New Member
This issue has been driving me crazy. Here is my code snippet: Also see attachement
The variable:var pid = DateTime.ParseE xact(e.RowData["PLAN_ISSUE_DAT E"], "dd-MMM-yyyy", null);
The stored procedure parameter:cmd.Parameters. Add("P_DOC_ISSU E_DATE", OracleDbType.Da te).Value = pid;
The error:PLS-00306: wrong number or types of arguments in call to

I have been surfing for 3 days trying to resolve this issue, please help! Thanks!
May 10 '12 #1
1 10782
cthomas7k
2 New Member
Solution: Make sure you dba tells you that he has set a window on the date parameter so you know when you enter a value outside of that window it retuns a null value, therby making you code fail, Yikes! Communication is key.
For all others it really simple:
The variable:
var pid = DateTime.ParseE xact(e.RowData["PLAN_ISSUE_DAT E"], "dd-MMM-yyyy", null);

The stored procedure section:
cmd.Parameters. Add("P_DOC_ISSU E_DATE", OracleDbType.Da te).Value = pid;
May 10 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
347
by: Sezhman | last post by:
I am using Oracle Database, Can anyone tell me, how to connect to the oracle database and run the stored procedure in oracle. I am facing some problem in this. please guide me.. -- Sezhman
1
12241
by: robin via SQLMonster.com | last post by:
I've tried several different way to execute a oracle stored procedure from a DTS package but to no avail. I have a Linked Server setup which does bring back Oracle tables from the server when I click on the Tables icon. Here's my DTS statement: exec omsd..OMS_TECO.SP_Callback_Update_Pkg(116); omsd is the linked server
2
2219
by: paddy_nyr | last post by:
What is the correct syntax for calling an oracle stored procedure and getting a retrun value? I created a simple procedure on my oracle database for testing and yes I know I could do this in a function but I have a more complex procedure that I have created for the creation of reports. I'm trying to use ora_parse and ora_bind without much luck. Any help would be much appreaciated. Thanks CREATE OR REPLACE PROCEDURE P_PHP_PROC_CALL (
2
4378
by: Raj | last post by:
Hi, Does anybody know how to call an oracle stored procedure ( with parameters ofcourse) from MS Access 2002. I want to invoke an oracle stored procedure which takes 2 parameters. Thanks, Raj.
0
1932
by: Chan | last post by:
Hi, I am trying to send set of rows from my c# web service to Oracle stored procedure. I think I can get this done using OpenXML in SQL Server. How to implement this in Oracle Stored Procedure? Can I pass a table or cursor or XML to Oracle stored procedure?
1
2608
by: Sudhish K V | last post by:
Hi all, How can i pass parameters to an oracle stored procedure from c# application? And also i need to read the return value. TIA, Sudhish.
1
3457
by: burtonl | last post by:
I'm using the ADODB abstraction layer and trying to figure out how to call an Oracle stored procedure. It has the following types defined: CREATE OR REPLACE TYPE varchar2_3200_array IS TABLE OF VARCHAR2(3200); / CREATE OR REPLACE TYPE number_array IS TABLE OF NUMBER; /
1
4187
by: zrtv | last post by:
hi All, Iam new in oracle stored procedure, i have one stored procedure and it has to be accessed from vb6. my stored procedure as follows -- employee salary will be entered by the user and itshould show employees less than the the given salary CREATE OR REPLACE PROCEDURE employee1(empcode OUT VARCHAR2, empname OUT VARCHAR2, POSITION OUT VARCHAR2, sal IN NUMBER) IS CURSOR c1 IS SELECT empid, empname, grade FROM empmst WHERE...
7
8222
by: E11esar | last post by:
Hi there. I have written a C# web service that calls an Oracle stored procedure. The SP is a simple select-max query and the table it is getting the value from has about 2.8 million rows in it. The field being MAX'd is an index field in the table. I have further ensured that the table has had an analysis and rebuild run on it to ensure good integrity but still I am finding the stored procedure takes around 3 minutes to return the MAX...
3
11796
by: rajkumarbathula | last post by:
Hi I was struck up with big problem of executing a oracle stored procedure in C#. Inputs 1:I am having 1 oracle stored procedure eg. myProc() and this procedure takes 1 INOUT parameter. of type stirng/varchar problem description: I am not able to execute this procedure through my C# code. for more information, below is the C# code that i am using...... OracleConnection con = new OracleConnection(StrConnectionString);
0
9541
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10485
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9073
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.