this is my code.. In my code i have succesful get table column name. But i want the first table column name showing not all. Thanks'

rs.Open(strSQL, adcLEDGER, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockPessimistic)

        Flds = adrCURR.Fields

        TotalCount = Flds.Count

        For Each fld In Flds
             MsgBox(fld.Name)
        Next

Recommended Answers

You may use array index - to retrieve columns list.

print Flds(0).Name '1st column
  print Flds(1).Name '2nd column
Jump to Post

All 3 Replies

You may use array index - to retrieve columns list.

print Flds(0).Name '1st column
  print Flds(1).Name '2nd column

One other field you may be interested in is .DataPropertyName if you're looking for the bound field's name. You would access it the same way adatapost showed you in his post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.