G
Guest
Hi
I try to fill a combobox with a dataset. I see the data in the dataset, but when i try to bind this dataset with a combobox. The list is fill only whith this message "System.Data.DataRowView". That was my code, can you help me.
Thanks!
Tr
'Create connection object
Dim strConnNorthwind As String = "Provider=oraoledb.oracle;User Id=sigrem; " &
"Data Source=sigrem.metis;password=adminsigrem
Dim cnPubs As OleDbConnection = New OleDbConnection(strConnNorthwind
Dim PubsDA As New OleDbDataAdapter("SELECT * FROM Projet", cnPubs
Dim dsAuthors As New DataSe
PubsDA.Fill(dsAuthors, "Projet"
Dim dvAuthors As DataView = dsAuthors.Tables("Projet").DefaultVie
With cboPub
.DataSource = dvAuthor
.DisplayMember = "NoProjet
End Wit
'With lstTes
' .DataSource = dvAuthor
' .DisplayMember = "NomUsager
'End Wit
'cboPubs.SelectedIndex = -
'cnPubs.Dispose(
'PubsDA.Dispose(
Catch ex As Exceptio
MsgBox(ex.Message, MsgBoxStyle.Information, Me.Text
End Try
I try to fill a combobox with a dataset. I see the data in the dataset, but when i try to bind this dataset with a combobox. The list is fill only whith this message "System.Data.DataRowView". That was my code, can you help me.
Thanks!
Tr
'Create connection object
Dim strConnNorthwind As String = "Provider=oraoledb.oracle;User Id=sigrem; " &
"Data Source=sigrem.metis;password=adminsigrem
Dim cnPubs As OleDbConnection = New OleDbConnection(strConnNorthwind
Dim PubsDA As New OleDbDataAdapter("SELECT * FROM Projet", cnPubs
Dim dsAuthors As New DataSe
PubsDA.Fill(dsAuthors, "Projet"
Dim dvAuthors As DataView = dsAuthors.Tables("Projet").DefaultVie
With cboPub
.DataSource = dvAuthor
.DisplayMember = "NoProjet
End Wit
'With lstTes
' .DataSource = dvAuthor
' .DisplayMember = "NomUsager
'End Wit
'cboPubs.SelectedIndex = -
'cnPubs.Dispose(
'PubsDA.Dispose(
Catch ex As Exceptio
MsgBox(ex.Message, MsgBoxStyle.Information, Me.Text
End Try