|
-
Nov 15th, 2017, 01:11 PM
#1
Thread Starter
Member
Saving to SQL issue
I have a web form that retrieves information from a SQL 2008 database, and some data has percentage symbols in it (%), which throws SQL errors when attempting to save. I am using parameterized queries to save, but the SQL stored Proc will not let me save. Can anybody tell me how to take the literal contents of a drop-down choice, including any characters like %, and write to the database without error?
The parameterized query is like this:
cmd.parameters.AddWithValue("@DBField", DDL1.selectedValue)
The stored proc is an update statement in the usual form
update table set column = @value
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|