472,131 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

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 17577
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.