Sir/Madam,
I am going to perform Oracle bulk insert but invalid bind parameter Papameters : System.dateTime warns here.
The field of Created Date is timestamp(0) which 22-MAR-13 08.13.27.000000000 PM is only accpeted format.
but when I trying to convert from string to DateTime as follows:
3/22/2013 8:00:00PM
using the following method:
item.CreatedDate = Convert.ToDateTime("19-MAR-13 08.13.27 PM");
// BELOW IS ORACLE BULK INSERT
using (OracleConnection myConnection = new OracleConnection(myConnectionString))
{
myConnection.Open();
using (var copy = new OracleBulkCopy(myConnection))
{
copy.DestinationTableName = "T_BQ";
copy.BulkCopyTimeout = 10;
copy.BatchSize = 1000;
var query = from item in list select item;
var dt = new System.Data.DataTable();
dt = ConvertToDataTable(query);
copy.WriteToServer(dt);
copy.Dispose();
copy.Close();
}
myConnection.Dispose();
myConnection.Close();
}