Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Reply
System.Data.SqlClient.SqlException:Incorrect syntax near '='
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
abhilash bc
8 years ago
295
1
Reply
my code is
SqlConnection con = new SqlConnection(clsutilities.STRCONN);
con.Open();
string query = "SELECT Rating FROM UserRating3 where pid=" + @pid;
SqlCommand cmd = new SqlCommand(query, con);
//SqlCommand cmd = new SqlCommand("SELECT Rating FROM UserRating1 ",con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
What is difference between Static and Private Constructor?
How to get one column value base on one condition Using EF