Combobox with oracle database

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
 
C

Cor Ligthert

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
 
W

William Ryan eMVP

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; " & _
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top