Combobox with oracle database

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Hi Antoine,

I don't see direct something, however the most change you have is that
"NoProjet" is not the name in the datatabel, it is case sensetive you know.

Did you know that those "with" statements are seldom used here anymore in
this newsgroup.
It's your choise of course, however for the typed characters you do not have
to do it, there are now more characters than without it.

However that was not the question, I hope the first sentence helps you.

Cor
 
Are you sure the datacolum names are correct? This is oftne the problem.
Antoine said:
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!!

Try

'Create connection objects
Dim strConnNorthwind As String =
"Provider=oraoledb.oracle;User Id=sigrem; " & _
 
Back
Top