TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sourav Kumar Das
526
2.5k
171.5k
Error while Conversion.
Sep 17 2018 2:17 AM
Getting Error in this Coloured Line....
"An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code
Additional information: Conversion failed when converting the varchar value '
[email protected]
' to data type int."
public bool IsUserExist(string Emailid)
{
bool flag = false;
SqlConnection connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConString"].ConnectionString);
connection.Open();
SqlCommand command = new SqlCommand("select count(*) from Register where UserID = '" + Emailid + "'", connection);
flag = Convert.ToBoolean(command.ExecuteScalar());
connection.Close();
return flag;
}
If there's a solution please send me the answers....
Reply
Answers (
1
)
Excel file data not getting inserted into SQL database.
insert html content into word document by OpenXML