SqlDataAdapter Question

  • Thread starter Patrick Olurotimi Ige
  • 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!
 
J

Joyjit Mukherjee

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
 
P

Patrick Olurotimi Ige

Thanks Joyjit for the reply.
But what do you mean by ctor or stmt??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top