KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to get data from database according to the item selected in the ComboBox but when I try to access the selected ComboBox item it gives me "System.Data.DataRowView" [...?] I did the same thing with a simple select query in another function and that works fine but I don't know why it doesn't work in this query: _dataAdapter.SelectCommand.CommandText = "SELECT lt.Name FROM Leader as lt LEFT JOIN Material as mt ON lt.Student_id=mt.lead_id where lt.Name=" + "'" + cmbLeader.SelectedItem.ToString() + "'"; Can anybody tell me what might be the problem?
Tags (comma-separated)
Save Edits
Cancel