difference between Data Set, Data Reader,Data Adapter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • donilourdu
    New Member
    • Jan 2007
    • 53

    difference between Data Set, Data Reader,Data Adapter

    hi all.

    1) I want know the difference betwwen DataSet,DataRea der,DataAdapter .

    2) How can I call Stored Procedure in vb.net

    with regards,
    Doni
  • aaryan
    New Member
    • Nov 2006
    • 82

    #2
    Originally posted by donilourdu
    hi all.

    1) I want know the difference betwwen DataSet,DataRea der,DataAdapter .

    2) How can I call Stored Procedure in vb.net

    with regards,
    Doni
    hi doni,
    Data reader is an object through which you can read a sequential stream of data. it's a forward only data wherein you cannot go back to read previous data.
    data set and data adapter object help us to work in disconnected mode. data set is an in cache memory representation of tables. the data is filled from the data source to the data set thro' the data adapter. once the table in the dataset is modified, the changes are broadcast to the database back thro; the data adapter.
    to know the usage of each, follow the link,

    http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson04.aspx

    stored procedures can be accessed from the coding thro' ado.net
    for that you have to mention your command type as stored procedure.

    Comment

    • rakeshkashnia
      New Member
      • Nov 2007
      • 1

      #3
      Using procedures in vb.net

      Dim con As New SqlClient.SqlCo nnection(Sessio n("ConnectionSt ring"))
      Dim adpater As SqlClient.SqlDa taAdapter
      Dim ndtTempTable As DataTable
      Dim dRow As DataRow
      adpater = New SqlClient.SqlDa taAdapter
      adpater.SelectC ommand = New SqlClient.SqlCo mmand("SelectCo mand", con)
      adpater.SelectC ommand.CommandT ype = CommandType.Sto redProcedure

      adpaterSelectCo mmand.Parameter s.Add(New SqlClient.SqlPa rameter("@Clien tID", SqlDbType.Int, 4))
      adpater.SelectC ommand.Paramete rs("@ClientID") .Value = niClientId


      Regards,
      Rakesh Kashnia

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by donilourdu
        hi all.

        1) I want know the difference betwwen DataSet,DataRea der,DataAdapter .

        2) How can I call Stored Procedure in vb.net

        with regards,
        Doni
        Why don't you read the specs for those classes and see for yourself.

        Comment

        Working...