Populating a Combo Box with multiple fields of data from a database
<p>I am trying to populate a combobox with data from a database - using sql. I am trying to use information from multiple fields (First Name, Last Name). I need the program to concatenate the fields and add the 'FullName' into the combobox. Here is the code that I am using - im getting an error as where the names should appear instead appears <strong>"System.Data.DataRowView"</strong>:</p>

<pre><code>Private Sub frmViewEmployee_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    con.Open()
    sqlstatement = "SELECT [First Name], [Last Name] FROM [EmployeeAccounts]"
    da = New OleDb.OleDbDataAdapter(sqlstatement, con)
    da.Fill(ds, "EmployeeName")
    Dim x As Short = 0
    Dim FirstName As String
    Dim LastName As String
    Dim MaxRows As Short = ds.Tables("EmployeeName").Rows.Count
    Dim FullName(MaxRows) As String
    x = 0
    While x &lt; MaxRows
        FirstName = ds.Tables("EmployeeName").Rows(x).Item(0)
        LastName = ds.Tables("EmployeeName").Rows(x).Item(1)
        FullName(x) = FirstName &amp; " " &amp; LastName
        x = x + 1
    End While
        comEmployeeName.DataSource = ds.Tables(CStr("EmployeeName"))
        comEmployeeName.DisplayMember = CStr(FullName(x))
        comEmployeeName.ValueMember = CStr(FullName(x))
End Sub
</code></pre>

<p>Any answers, within reason, are appreciated - whether that be corrections or new code entirely.</p>