Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1


DBGrid does not return fieldname from Column[0] CT6.8 4 years 7 months ago #13744

  • Jose Ceravolo
  • Jose Ceravolo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
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
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
isFullName := true;
fullnamefield := currentfield;

I hope the error is mine, but I can't see it.



Please Log in or Create an account to join the conversation.

  • Page:
  • 1