By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 916 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

C#, Database Binding to ComboBox

P: 3
I have bounded a simple database, employee’s last name and first name to a combo box. Now I want the output to show the last name, separated by a comma, followed by first name (Smith, John). The smart tag of the comboBox only allows me to display either the first name or the last name. I tried bunch of setting in ‘add query’ and properties to no avail.

Thank you
Apr 25 '07 #1
Share this Question
Share on Google+
4 Replies


dip_developer
Expert 100+
P: 648
I have bounded a simple database, employee’s last name and first name to a combo box. Now I want the output to show the last name, separated by a comma, followed by first name (Smith, John). The smart tag of the comboBox only allows me to display either the first name or the last name. I tried bunch of setting in ‘add query’ and properties to no avail.

Thank you
have u tried selecting your records like
SELECT lastname+','+firstname FROM Tablename ?????
Apr 25 '07 #2

P: 3
It wouldn’t allow me to save the new query. The error message is: “The schema returned by the new query differs from the base query.” Then the only choice is OK and I have to cancel the new query. But your schema works, during the query builder and Execute Query, it shows the right order of names, but it wouldn’t let me save it. Have any other thoughts???

Thanks
Apr 25 '07 #3

P: 3
Thanks, dip_developer

It worked, I had to change the properties in ‘edit dataset with designer’ to your scheme and it worked.

Thanks again.
Apr 25 '07 #4

dip_developer
Expert 100+
P: 648
Thanks, dip_developer

It worked, I had to change the properties in ‘edit dataset with designer’ to your scheme and it worked.

Thanks again.

you are always welcome....by the way nothing to thanks.....we are here to share our knowledge....
Apr 26 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.