Returning a dataset from a componant [RESOLVED]
Hi all ive got this class of
VB Code:
#Region "Data set"
Public Function GetDataSet()
Try
Dim myCommand As SqlCommand = New SqlCommand
Dim myReader As SqlDataReader = myCommand.ExecuteReader
With myCommand
.Connection = MyConnection
.CommandType = CommandType.StoredProcedure
.CommandText = "GetAllLetters"
End With
Return myReader
Return True
Catch ex As Exception
mErrorMsg = ex.ToString
Return False
End Try
End Function
#End Region
Which should hopefully just return me a dataset which i wana bind to a combo box
VB Code:
Dim objData As DesignerDI.GetDI
Me.cboLetter.DataSource = objData.GetDataSet
How can i bind it to the control ?