|
Question : The string was not recognized as a valid DateTime when I call the Stored Procedure
|
|
Hi
I'm getting this error when I execute the stored procedure from my VB.NET Programme. What is the mistake I'm doing:
ERROR: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0
This is the code I have:
myCMD.Parameters.Add(New OracleParameter("i_start_dt_gmt", OracleType.DateTime)).Value = "TO_DATE('& strdate &',DD-MON-YYYY HH:MM:SS AM/PM)" myCMD.Parameters.Add(New OracleParameter("i_end_dt_gmt", OracleType.DateTime)).Value = "TO_DATE('& strdate1 &',DD-MON-YYYY HH:MM:SS AM/PM)" myCMD.ExecuteNonQuery()
Try MyDA.Fill(Ds) Catch x MessageBox.Show(x.Message.ToString) End Try
I'M CALLING AN ORACLE STORED PROCEDURE. ANY HELP PLEASE.
Thanks vm
|
|
Answer : The string was not recognized as a valid DateTime when I call the Stored Procedure
|
|
myCMD.Parameters.Add(New OracleParameter("i_start_dt_gmt", OracleType.DateTime)).Value = CDate(strdate)
|
|
|
|