Using a dropdownlist to insert data into SQL database
Closed
mikeoe2003
Posts
24
Registration date
Thursday November 1, 2012
Status
Member
Last seen
March 27, 2014
-
Mar 27, 2014 at 02:38 PM
Blocked Profile - Mar 27, 2014 at 05:26 PM
Blocked Profile - Mar 27, 2014 at 05:26 PM
Related:
- Using a dropdownlist to insert data into SQL database
- Access database download - Download - Databases
- Oracle sql datediff - Guide
- How to insert a checkmark in word - Guide
- Insert gif into excel - Guide
- How to insert photo in word for resume - Guide
1 response
Ok, well more than likely your drop down list is reporting as the "INDEX" number of the drop down. So, if you are looking for a text input into the DB, you are more than likely getting an integer. The integer is the index of the selection of the list.
Make a debug statement to make certain that you are inserting what you expected.
If that is not it, then try your question again, because basically all you posted whas an SQL statement being programmatically produced from form elements.
SelectedValue property gives you the actual value of the item in selection whereas SelectedItem.Text gives you the display text.
It has been a while!
Let us know!
"If you can't soar with the eagles, then don't fly with the flock!" - Oliver Sykes; Bring Me The Horizon
Make a debug statement to make certain that you are inserting what you expected.
If that is not it, then try your question again, because basically all you posted whas an SQL statement being programmatically produced from form elements.
SelectedValue property gives you the actual value of the item in selection whereas SelectedItem.Text gives you the display text.
It has been a while!
Let us know!
"If you can't soar with the eagles, then don't fly with the flock!" - Oliver Sykes; Bring Me The Horizon
Mar 27, 2014 at 05:26 PM
'_" + StResidDropDownList.SelectedValue + "_','_" + StOrgDropDownList.SelectedValue + "_'
Every place I have put a"_" is where you have coded a space! FYI!