I'm working on a pretty simple project, but I've run into some trouble and so I hope someone can help! I have a combo box and a grid sharing a single page.
The combo box is populated with names from a SQL database. On changing, the combo box does an auto-postback and populates the grid with a few rows from a table called "Housing" based on the value of the Combo Box.
The combo box selection and subsequent population of the grid actually works very smoothly.
The problem I'm having is when I try to use the "update" function in the grid. When I try to update, I receive an error that says "Incorrect syntax near 'nvarchar'. *line break* Must declare the scalar variable '@housing_id'". (I have a feeling that it is actually two different errors).
Now the strange part to me is that I can get the update function to work by putting in a new grid that is not affected by the combo box (it displays all of the "Housing" items, not just those specific to one user). I use the same exact insert/select/update/delete functions.... so I'm terribly confused as to why it doesn't work when I put the combo box into the equation.
Thanks for any help!
The combo box is populated with names from a SQL database. On changing, the combo box does an auto-postback and populates the grid with a few rows from a table called "Housing" based on the value of the Combo Box.
The combo box selection and subsequent population of the grid actually works very smoothly.
The problem I'm having is when I try to use the "update" function in the grid. When I try to update, I receive an error that says "Incorrect syntax near 'nvarchar'. *line break* Must declare the scalar variable '@housing_id'". (I have a feeling that it is actually two different errors).
Now the strange part to me is that I can get the update function to work by putting in a new grid that is not affected by the combo box (it displays all of the "Housing" items, not just those specific to one user). I use the same exact insert/select/update/delete functions.... so I'm terribly confused as to why it doesn't work when I put the combo box into the equation.
Thanks for any help!