Results 1 to 13 of 13

Thread: Returning a dataset from a componant [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    Returning a dataset from a componant [RESOLVED]

    Hi all ive got this class of

    VB Code:
    1. #Region "Data set"
    2.         Public Function GetDataSet()
    3.             Try
    4.                 Dim myCommand As SqlCommand = New SqlCommand
    5.                 Dim myReader As SqlDataReader = myCommand.ExecuteReader
    6.                 With myCommand
    7.                     .Connection = MyConnection
    8.                     .CommandType = CommandType.StoredProcedure
    9.                     .CommandText = "GetAllLetters"
    10.                 End With
    11.  
    12.                 Return myReader
    13.  
    14.                 Return True
    15.             Catch ex As Exception
    16.                 mErrorMsg = ex.ToString
    17.                 Return False
    18.             End Try
    19.         End Function
    20. #End Region

    Which should hopefully just return me a dataset which i wana bind to a combo box
    VB Code:
    1. Dim objData As DesignerDI.GetDI
    2.  Me.cboLetter.DataSource = objData.GetDataSet
    How can i bind it to the control ?
    Last edited by carlblanchard; Jan 29th, 2004 at 04:04 AM.
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

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