Hi all. I am using VS2008 Pro. I have a simple DVD database built. I'm trying to make a data driven app to store my dvd collection.
One of my tables is Actors and is structured as follows.
ActorID - int - PK
LastName - varchar(20)
FirstName - varchar(20)
On a form in my app I have a combobox. I'm trying to make it list FirstName LastName ie. Will Smith. I know how to make a query that'll take the LastName and FirstName fields and list it as Actor. I'm having a heck of a time getting it to do that in the combobox as it'll only let me use one field for the display and won't let me use the query I've made...
I keep getting some error about schema don't match default query. I know I could simply change the table to only have one field that holds first and last name, but from what I understand that's not proper db practice. I've searched this site and google until I was blue in the face at looking at soulutions that don't match what I'm trying to do. Does anyone know of a trick to do this?
One of my tables is Actors and is structured as follows.
ActorID - int - PK
LastName - varchar(20)
FirstName - varchar(20)
On a form in my app I have a combobox. I'm trying to make it list FirstName LastName ie. Will Smith. I know how to make a query that'll take the LastName and FirstName fields and list it as Actor. I'm having a heck of a time getting it to do that in the combobox as it'll only let me use one field for the display and won't let me use the query I've made...
Code:
SELECT FirstName + ' ' + LastName AS Actor FROM Actors ORDER BY LastName
Comment