That's an unusual error. There's no bugs reported with similar symptoms.
What ODP.NET version are you using?
Do you have a simple test case to reproduce?
Thanks for the reply.
Name Null Type
Here is my sample code
private void button1_Click(object sender, EventArgs e)
string SQLCON = @"Data Source=(local);Initial Catalog=MyDataBase;Integrated Security=True";
string OraclCon = @"user id=myUserID;password=myPassword;data source=mydataSource";
string SQLCommand =@"SELECT CAST(GETDATE() AS DATE) as MyDate";
SqlDataReader dr = null;
SqlConnection SQLCon = new SqlConnection(SQLCON);
SqlCommand cmd = new SqlCommand(SQLCommand, SQLCon);
cmd.CommandTimeout = 600;
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
OracleBulkCopy objOBC = new OracleBulkCopy(OraclCon);
objOBC.DestinationTableName = "MY_TEST_TBL";
objOBC.BatchSize = 500000;
objOBC.BulkCopyTimeout = 10000;
After the above code runs
Actual Result 13/Aug/1420
Expected Result: 13/Aug/2014
Please See the image below
Thanks you so much
I would like to add one more bit to it that may help
When i do Bulkcopy against Oracle XE on my local box it works fine. However, driver swaps century and year when Bulkcopy is used against instance running on Sun Solaris
I had a suspicion this was an endianness-related problem, or more precisely imperfect endian conversion.The last piece of info cinched it. XE generally runs on Intel hardware (little endian), which is different from Solaris (big endian).
This is very likely Bug 17785632, which has been fixed. The fix is not available in any current ODAC release, but will be in the next ODAC release. If you have access to Oracle's support site, the fix is available in the latest 22.214.171.124 patch or you can wait for the 126.96.36.199 DB client Windows release which should be available in the coming weeks.
Thanks for your reply. I have got the patch from Oracle's support site. The README.txt file that explains the installation instructions refers to two files Oraclient11.dll and OraGeneric11.dll. I can only find Oraclient11.dll file in the patch folder and missing .OraGeneric11.dll file Also, looks to me that the patch instructions are for Linux/Unix. Is the same available for windows platform ?
That may be an oversight on the patch instructions. Try applying Oraclient11.dll by itself. The patch is for Windows. Was there an instruction in it that could only be done on Linux/Unix? Opatch will work on Windows.
The other way to apply this fix is to apply the cumulative patch 188.8.131.52.2 or higher. That contains the same client fix, plus additional ones.