windows forms, oracle backend

dotolee

Member
Joined
Nov 30, 2004
Messages
20
Programming Experience
10+
Hi there.
i have created a form that is bound to a table in oracle.
all data loads properly until i do the following:
each field that is populated presents answers to questions on the form.
so for example, i have the following label:

question 1: how are you today?

Beside the label, i have a combo box that is loaded via an xml file. Next to the combo box, i have a text box that contains the actual answer from the database.

I'm noticing that when I write code to save the selected value from the combo into the text box, when the app starts up, instead of showing the current value in the database it shows a string that says "System.Data.DataRowView".

Here's the code to load data into the combo box:
VB.NET:
        With Me.cmbohowareyou
                .DataSource = dsabc.Tables("ROW")
                .DisplayMember = "RESPONSE"
                .ValueMember = "VALUE"
            End With


And the code to populate the textbox with the user's response:

VB.NET:
Private Sub cmbohowareyou_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbohowareyou.SelectedIndexChanged
        howareyou.Text = cmbohowareyou.SelectedValue.ToString
    End Sub

when i remove the event handler above, everything goes back to normal.
can you tell me what i'm doing wrong?
thanks.
 

Latest posts

Back
Top