• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 712
  • Last Modified:

Special characters

error:
System.Data.SqlClient.SqlException: The conversion of the varchar value '312' overflowed an INT1 column. Use a larger integer column. The statement has been terminated. at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at ams.DAL.DataLayer.RunSQL(String sqlText, Int32& identity)


When a user enters any special charecters like ' ""% etc I am getting the above error. How do I allow user to enter whatever they want.

Pls help.

I am using VB.net with ASP.net
0
sureshraina
Asked:
sureshraina
1 Solution
 
rstraderCommented:
is the problem special characters or that you are trying to insert characters into an int column in your database.

I'd change the db column to varchar and htmlencode the value or use a validator on the asp.net form and only allow numeric input.
0
 
skumar159Commented:
Hi,

I need more clarification on this.  I want to know that what type value you are passing to the database column.  Mention the type of the column.

- Suresh
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now