SqlDataAdapter Question

  • Thread starter Thread starter Patrick Olurotimi Ige
  • Start date Start date
P

Patrick Olurotimi Ige

Am using a string to do select from a table
string strCon ="select subject, name, email, message ,date FROM newpost
WHERE postid="+postid

But i want to use it with a SQLAdapter like this:-

da = new SqlDataAdapter("select subject, name, email, message ,date
FROM newpost WHERE postid =+postid" ,myConn);

My code is in C#..
Is it ok!
 
Yes Patrick, the ctor seems OK, but the select stmt would be

"select subject, name, email, message ,date FROM newpost WHERE postid
="+postid

HTH

regards
Joyjit
 
Back
Top