Oracle Community Directory
Oracle Community FAQ
My Oracle Support Community (MOSC)
Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Database Application Development
Windows and .NET
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
: Apr 3, 2013 7:23 AM by
EF execution of stored procedure with DATE parameter loses hours/minutes
Apr 3, 2013 7:23 AM
I have a simple stored procedure using DATE as an input:
CREATE OR REPLACE PROCEDURE delete_time(myTime DATE) IS
DELETE FROM mytable WHERE time = myTime;
This has been added to my EDMX using a function import, and the types mapped are Date on the SSDL side and DateTime on the CSDL.
The problem is when I run the procedure from .NET using a DateTime the hours and minutes are lost somewhere along the way:
DateTime dt = new DateTime(2013, 4, 3, 12, 15, 00);
var timeParam = new ObjectParameter("myTime", dt) :
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("DeleteTime", timeParam);
This runs the stored procedure but deletes the rows where TIME = 03-APR-2013 00:00:00 instead of 03-APR-2013 12:15:00
Is there some bug in the Oracle client (I'm using 18.104.22.168.20)? Or am I doing something wrong above?
I also tried using TIMESTAMP as the input type of my procedure, but then I get this error when calling the function:
ORA-01830: date format picture ends before converting entire input string
This content has been marked as final.
Show 0 replies