Related to ADO.Net
How to pass SQL query into data adapter
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Pravin MoreRank #1,419 · 1.2K reputationPosted Sep 22, 2011, 9:27 PM EDT
Do like this,
SqlConnection con=new SqlConnection();
con.Open();
SqlDataAdapter adpt=new SqlDataAdapter("Select * from TableName ",con);
DataTable dt=new DataTable();
adpt.Fill(dt);
hope this will work for you.
Thanx,
Pravin.