Tuesday, 10 April 2012

What is Data set and what is the use of dataset

Dataset: Dataset is a collection of tables. It works in disconnected mode. it can have more than one tables at a time with the help of dataadapter.
for ex:
dim sql1,sql2 as string
dim ds as new dataset
dim adp as new sqldataadapter
sql1="select * from table1"
sql2="select * from table2"
ds=new dataset
adp=new sqldataadapter(sql1,sqp2,con)
adp.fill(ds)
if ds.tables(0).rows.count>0 then
msgbox("table1")
if ds.tables(1).rows.count>0 then
 msgbox("table2")

No comments:

Post a Comment