0

当我使用 OracleBulkCopy 时,我收到错误“ORA-44003:无效的 SQL 名称”。我已经三次检查了我的表名和列名。我究竟做错了什么?

// Create DataTable
DataTable dt = new DataTable();
dt.Columns.Add("MYCOL");

// Populate DataTable with data
for (int i = 0; i < 10; i++)
{
    DataRow row = dt.NewRow();
    row[0] = "DUMMYDATA" + i.ToString();
    dt.Rows.Add(row);
}

// Copy to Oracle
OracleConnection oc = new OracleConnection("secret");
oc.Open();
using (OracleBulkCopy bc = new OracleBulkCopy(oc))
{
    bc.DestinationTableName = "STG1.INVOICE";
    bc.WriteToServer(dt);
}
oc.Close();
oc.Dispose();
4

0 回答 0