I have this Sql query:
INSERT INTO myTable (myField) VALUES (N'Thermal Oxide: 0 Å to 40 μm')
and I want to exeute it by SqlBulkCopy like that:
DataTable myDataTable=myDb.getData("select top 1* from myTable").Clone();
DataRow dr = myDataTable.NewRow();
dr["myField"] ="N'Thermal Oxide: 0 Å to 40μm'";
myDataTable.Rows.Add(dr);
this.openCon();
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(con)) {
bulkCopy.DestinationTableName = dt.TableName;
bulkCopy.BulkCopyTimeout = 100;
bulkCopy.WriteToServer(myDataTable);
} this.closeCon();
It is work perfect, but my question is: where can I initilize the 'N' prefix? and maybe there is no need?
Thanks, chani