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
How can i bind it to the control ?VB Code:
Dim objData As DesignerDI.GetDI Me.cboLetter.DataSource = objData.GetDataSet




Reply With Quote