469,323 Members | 1,553 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

difference between Data Set, Data Reader,Data Adapter

donilourdu
hi all.

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

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

with regards,
Doni
Jan 29 '07 #1
3 17496
aaryan
82
hi all.

1) I want know the difference betwwen DataSet,DataReader,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.
Jan 29 '07 #2
Using procedures in vb.net

Dim con As New SqlClient.SqlConnection(Session("ConnectionString" ))
Dim adpater As SqlClient.SqlDataAdapter
Dim ndtTempTable As DataTable
Dim dRow As DataRow
adpater = New SqlClient.SqlDataAdapter
adpater.SelectCommand = New SqlClient.SqlCommand("SelectComand", con)
adpater.SelectCommand.CommandType = CommandType.StoredProcedure

adpaterSelectCommand.Parameters.Add(New SqlClient.SqlParameter("@ClientID", SqlDbType.Int, 4))
adpater.SelectCommand.Parameters("@ClientID").Valu e = niClientId


Regards,
Rakesh Kashnia
Nov 14 '07 #3
r035198x
13,262 8TB
hi all.

1) I want know the difference betwwen DataSet,DataReader,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.
Nov 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by pmud | last post: by
4 posts views Thread by William | last post: by
4 posts views Thread by shapper | last post: by
6 posts views Thread by Arne Beruldsen | last post: by
1 post views Thread by simonZ | last post: by
3 posts views Thread by bbawa1 | last post: by
6 posts views Thread by insirawali | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.