Home > Interview Questions > ADO.NET > How to fill dataset using DataAdapter using ADO.NET?

How to fill dataset using DataAdapter using ADO.NET?

by Spidy   on 18/05/2011   Category: ADO.NET   |  Level: Beginner   |  Views: 1871    |  Points: 25     |  Silver 

sample code snippet for loading dataset using DataAdapter fille method.


using System;
using System.Data;
using System.Data.SqlClient;

using (SqlConnection objConn = new SqlConnection("....."))
SqlDataAdapter objAd = new SqlDataAdapter("Select * from Employees", objConn);
DataSet objDS = new DataSet();
catch(Exception ex)
throw ex;

« How do you handle exceptions in the asp.net web form using error events?
» What is the use of DataAdapter.Fill() in ADO.NET?
Post Question  |  Question Home

Recent Posts

User Responses

No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts