Code
String sql = "SELECT * FROM MIS.dbo.ListEmployee";Code
String sConnectionString = "ConnectionString";DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(sql ,sConnectionString);
adapter.Fill(ds);
For working with Data Adapter no need to Connection Object ,means if you are using connect Object no need to connection Open. try
String sql = "SELECT * FROM MIS.dbo.ListEmployee";String sConnectionString = "ConnectionString";DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(sql ,sConnectionString);
adapter.Fill(ds);
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyFeatured eBookClaude for AI-Native BuildersDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.