TOracleDirectPathLoader : Question about setting null values to number field

windnet

Member
C++ Builder 6.0, doa 4.0.7.1, Oracle 9i.
Now I am trying to use TOracleDirectPathLoader to load data into table. But I don't know how to set Null to a number field。If I don't setData to 0, it raise an Exception ORA-01460(unimplemented or unreasonable conversion requested ), while call DataLoader->Load();

If I init it as the following code, it work. But all the number field which I really want to be null will be set to 0.

AnsiString* strNull = new AnsiString("");
for (int j=0;jColumns->Count;j++)
{
if(DataLoader->Columns->Items[j]->DataType != dpString)
DataLoader->Columns->Items[j]->SetData(Row, &iNull, 0);
else
DataLoader->Columns->Items[j]->SetData(Row, strNull, 0);
}

How can I set the Number Column to Null?

Thanks for any help.
 
Last edited:
Back
Top