Hi Guys,
This is a weird one.
I created a little program to import CSV into my database and it works for the most part.
The only weird thing is that when I try to get and field name for Column[0] it does work the first time I run the procedure.
It also does not raise an exception.
The second time, it works...
Here's the code excerpt.
for ncount := 0 to dbgImport.Columns.Count - 1 do
begin
currentfield := dbgImport.Columns[ncount].FieldName; ============>>> does not return for Column[0], that should be field Column1 it does return all the other columns.
if UpperCase(dsImport.DataSet.FieldByName(currentfield).asString) = 'NAME' then
begin
isFullName := true;
fullnamefield := currentfield;
end;
end;
I hope the error is mine, but I can't see it.
Thanks,
Jose.