PDS8475
Active member
- Joined
- Jun 25, 2019
- Messages
- 41
- Programming Experience
- Beginner
I have to access Tables
ItemsForSale
Engineering
I have a textbox
Details1_textBox
I am passing Details1_textBox.text to the parameter @s
The Details1_textBox.text value is a name
The ItemsForSale table doesn't contain a Name column
How ever the Engineering table does
Both tables contain a Serial column
The output of the query is displayed in the DataGridView called idataGridView
I am trying to sort the records in idataGridView to only show records based on the name that is entered into Details1_textBox
I am using the query
but this gives me a exception saying "At most only one record can be returned by this subquery"
How ever I need the query to be able to return multiple records
I know the C# code that I have wrote works, as if I change the query to something simple it works fine, hence why I have only put the query.
ItemsForSale
Engineering
I have a textbox
Details1_textBox
I am passing Details1_textBox.text to the parameter @s
The Details1_textBox.text value is a name
The ItemsForSale table doesn't contain a Name column
How ever the Engineering table does
Both tables contain a Serial column
The output of the query is displayed in the DataGridView called idataGridView
I am trying to sort the records in idataGridView to only show records based on the name that is entered into Details1_textBox
I am using the query
C#:
"Select * FROM ItemsForSale WHERE Serial = (SELECT Serial FROM Engineering WHERE Engineering.[Name] = @s)"
but this gives me a exception saying "At most only one record can be returned by this subquery"
How ever I need the query to be able to return multiple records
I know the C# code that I have wrote works, as if I change the query to something simple it works fine, hence why I have only put the query.
Last edited: