chrisbunch
New member
- Joined
- Jun 7, 2004
- Messages
- 1
Hey guys, I hope this will be an easy elementary question. I am trying to write a parameterized query using an Access database.
There are two tables one contains header information about products and one contains components of each product. The windows form has a combobox where the user can select the product name. After a selection is made, a datagrid should fill with the components information for that product.
I can get it to work easily with SQL Server (just by putting '= @ PName' in the criteria), but the company's data is in Access. I am currently using '= ?' in the criteria and setting the myDataAdapter.Selectcommand.Parameters("?").Value=cboPName.Text.
I get the error:
Additional information: An OleDbParameter with ParameterName '?' is not contained by this OleDbParameterCollection.
I greatly appreciate any help you can offer.
There are two tables one contains header information about products and one contains components of each product. The windows form has a combobox where the user can select the product name. After a selection is made, a datagrid should fill with the components information for that product.
I can get it to work easily with SQL Server (just by putting '= @ PName' in the criteria), but the company's data is in Access. I am currently using '= ?' in the criteria and setting the myDataAdapter.Selectcommand.Parameters("?").Value=cboPName.Text.
I get the error:
Additional information: An OleDbParameter with ParameterName '?' is not contained by this OleDbParameterCollection.
I greatly appreciate any help you can offer.