Thanks for your help.
But I have passed Double value to SetData, and still have the same problem.
If I change CaseNo field from NUMBER(8) to NUMBER(9,1), it works. But we will need to change many tables and storeProcedure if we have to do it like this.
Oracle 9i, C++ Builder 6.0.
Sample Code:
create table TEST_TABLE1
(
CASENO NUMBER(8)
);
OracleSession1->LogOn();
DataLoader->TableName = "test_table1";
DataLoader->GetDefaultColumns(false);
DataLoader->Prepare();
AnsiString fieldName = "CaseNo";
int Row = 0;
double caseValue = 7;
int count = 3;
for (int i=0; i< count ; i++)
{
TDirectPathColumn *pColumn = DataLoader->ColumnByName(fieldName);
int ColType = pColumn->DataType;
switch(ColType)
{
case dpString:
pColumn->SetData(Row, NULL, 0);
break;
case dpInteger:
pColumn->SetData(Row, &caseValue, 0);
break;
case dpFloat:
pColumn->SetData(Row, &caseValue, 0);
break;
default:break;
}
Row++;
}
if (Row == count)
{
try
{
DataLoader->Load(Row);
}
catch (EOracleError &E)
{
ShowMessage(E.Message + "\n\n" +
"Row = " + IntToStr(DataLoader->LastRow) + ", " +
"Col = " + IntToStr(DataLoader->LastColumn));
DataLoader->Abort();
}
}
DataLoader->Finish(); // Commit the loaded data
OracleSession1->LogOff();