Databinding problem
-
I am a newbie programing with VB.NET. I need to write an app separating Data Access Layer and form. In my DAL I have the following method: Public Function GetcboRelationsDataSet() As cboRelationsDataSet Dim ds As New cboRelationsDataSet Try cboRelationsDataAdapter.Fill(ds) return ds Catch exc As Exception Dim msg As String msg = "Error reading Widget List from database" Throw New DALException(msg, exc, Nothing) End Try End Function And in my form this code to bind the dataset: Private Sub frmListeRelations_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim rh As New RelationsHandler Try lstRelations.DataSource = rh.GetcboRelationsDataSet lstRelations.DisplayMember = "sNom" lstRelations.Refresh() Catch ex As Exception End Try End Sub Is this correct ? The code runs fine but no data comes up. jean-luc