I'm using the
OracleBulkCopy functionality to insert data into a table, but am running into issues with Unicode fields.
I am making use of the latest version of the
Oracle.ManagedDataAccess library (v.19.11.0), targeting the full .NET Framework (4.7.1).
My test table was created using the following statement:
CREATE TABLE TestTable
The C# code that inserts the data looks like this:
using (var bulkCopy = new OracleBulkCopy(connection))
bulkCopy.DestinationTableName = "TestTable";
var table = new DataTable("TestTable");
var row = table.NewRow();
row["StringValue1"] = "ABC";
row["StringValue2"] = "ABC";
The code executes without any errors. When selecting the results from the table I see the following:
As you can see from the result, the
NVARCHAR2 field was not populated correctly. Is this a bug in the library or is there some additional logic required for Unicode fields?
Any help would be be appreciated!