Question:

What is sqldataadapter in dot Net?

by Guest229  |  earlier

0 LIKES UnLike

 Tags:

   Report

3 ANSWERS


  1. Sql Data adapter is a class of System.Sql.SqlClient  Represents a set of data commands and a database connection that are used to fill the DataSet and update a SQL Server database. This class cannot be inherited.


  2. SqlDataAdaptor in an object which acts like a bridge between Database(Sql database) and Dataset object.

    private static DataSet SelectRows(DataSet dataset,
        string connectionString,string queryString)
    {
        using (SqlConnection connection =
            new SqlConnection(connectionString))
        {
            SqlDataAdapter adapter = new SqlDataAdapter();
            adapter.SelectCommand = new SqlCommand(
                queryString, connection);
            adapter.Fill(dataset);
            return dataset;
        }
    }

  3. private static DataSet SelectRows(DataSet dataset,
        string connectionString,string queryString)
    {
        using (SqlConnection connection =
            new SqlConnection(connectionString))
        {
            SqlDataAdapter adapter = new SqlDataAdapter();
            adapter.SelectCommand = new SqlCommand(
                queryString, connection);
            adapter.Fill(dataset);
            return dataset;
        }
    }

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.