Hi friend
i am new and in my project i have use asp.net and oracle database,
when i have enter date in textbox like(9/11/2013 - month-date-year) and run into insert query.
it will give me a error like:(ORA-01843: not a valid month at System.Data.OracleClient.).
so please help me for that.,
Thanks
Loading
Suthish NairPosted Sep 13, 2013, 8:13 AM
jignesh prajapatiPosted Sep 13, 2013, 7:42 AM
in txtbook_dt.text where am i store date.
protected void btnSave_Click(object sender, EventArgs e)
Sanjeeb LenkaPosted Sep 13, 2013, 7:05 AM
share your sample code:aspx and .cs fro insert
jignesh prajapatiPosted Sep 13, 2013, 6:54 AM
Suthish NairPosted Sep 13, 2013, 6:12 AM
Sanjeeb LenkaPosted Sep 12, 2013, 2:32 AM
jignesh prajapatiPosted Sep 12, 2013, 2:01 AM
IN TEXTBOX VALUE LIKE(9/11/2013) THIS,
NOW, IN QUERY I HAVE WRITE CODE LIKE (DateTime.TryParseExact(txtbook_dt.Text, "MM/dd/yyyy", null, System.Globalization.DateTimeStyles.None))
IT IS RIGHT OR WRONG
SO HELP ME
Sanjeeb LenkaPosted Sep 12, 2013, 1:37 AM
you have to insert it in "DD-MON-YY" or dd-MMM-yyyy format because this is the default format for Oracle.
before inserting to database convert it to "DD-MON-YY" or dd-MMM-yyyy format.