Results 1 to 8 of 8

Thread: Create Array from column in dataset (Resolved)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    259

    Create Array from column in dataset (Resolved)

    I want to create an array from a column in a dataset. Basicaly I want to put all the Zipcodes from the ueZip field into an array. Is that possible? My goal is to use what I learned on this thread Question about Array with an array created from a dataset instead of a hardcoded one as I do there.

    VB Code:
    1. Dim strSelect2 As String = _
    2.             "Select ueStore, ueAddress, ueCity, ueState, " & _
    3.             "ueZip From queUncEdsZCodes " & _
    4.             "Where Latitude <=" & HighLatitude & _
    5.             "And Latitude >=" & LowLatitude & _
    6.             "And Longitude <=" & HighLongitude & _
    7.             "And Longitude >=" & LowLongitude
    8.  
    9.         Dim Cmd2 As New OleDbDataAdapter(strSelect2, conn)
    10.         Dim ds As New DataSet
    11.         Cmd2.Fill(ds, "ZipCodes")
    12.  
    13.         Return ds
    14. End Function
    15.  
    16. ......Snip.....
    17.  
    18. Dim myDS As DataSet = GetUE_ZipRadius(tbZip.Text, CInt(tbRadius.Text))
    19. DataGrid1.DataSource = myDS
    20. DataGrid1.DataMember = "ZipCodes"
    Last edited by FastEddie; Mar 26th, 2006 at 03:39 PM.

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