Results 1 to 3 of 3

Thread: Small Piece missing trying to retrieve field headers from DataEnvironment

  1. #1
    mememee
    Guest

    Question Small Piece missing trying to retrieve field headers from DataEnvironment

    Hello hello,

    I am looking for a genius to help me, or a dummy, doesn't matter as long as it works

    I am trying to get my fields from my command1 in my dataenvironment1 into an array, myarray()

    I can get my fields.item <---That's not what I need.

  2. #2
    New Member
    Join Date
    Jul 2001
    Posts
    12
    have you tried:
    with my dataenvironment.recordset
    do while not .eof
    for indx = 0 to .recordset
    myarray(indx) = !FieldName
    .movenext
    next indx
    loop
    end with

  3. #3
    mememee
    Guest

    Cool Small Piece missing trying to retrieve field headers from DataEnvironment

    I got it!!! I got it!!! Woohoo (you all know the happy dance)
    I'm doin' it.

    I ALWAYS forget to ReDim my arrays!!

    Thank you all.

    Dim myarray() As String
    With DataEnvironment1.rsCommand1

    .Open

    Do While Not .EOF

    Dim i As Integer
    i = .Fields.Count

    For indx = 0 To i
    ReDim myarray(0 To i) As String

    myarray(indx) = .Fields.Item(indx).Name

    .MoveNext
    Next indx

    Loop

    End With

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width