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
Deepali Patil
NA
142
56.3k
Hi...I am trying to solve this error but m not able to.
Nov 28 2012 6:17 AM
This is my code :
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
con.Open();
string cmdstr = "select count(*) from [Registration] where UserName'" + txtUsername.Text + "' ";
SqlCommand cmd = new SqlCommand(cmdstr, con);
int temp = Convert.ToInt32(cmd.ExecuteScalar().ToString()); /
/its giving error on this line.
con.Close();
I am getting this exception :
System.Data.SqlClient.SqlException: Incorrect syntax near 'Deepali'.
when i enter the username as 'Deepali' on login page.
Reply
Answers (
1
)
I am getting an error "The multi-part identifier "tblChitReg
Upload Files Asynchronously Using AJAX into SQL Server Database(like gmail).