Sequence to connect and retrieve data from database useig
dataset ?

Answer Posted / ashokdahiya

We r talking about vb.net not c# codding
system.data
system.data.sqlclient

dim con,s as string
con="Server=servername;database=name;uid=sa;pwd=;"
s="Select * from tablename"
dim ad as new sqldataadapter(s,con)
dim ds as dataset
ad.fill(ds)
dim dv as dataview= new dataview(ds.tables("tablename"))
dv.sort="Name desc"
listbox.datasource=ds
listbox.displayMember="Name"&"Age"&"sex"...

it will work fine thanx!

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ole in excel?

706


What is the difference between sqldatareader and sqldataadapter?

711


Give an example that shows how to execute a stored procedure in ado.net?

794


What is untyped dataset?

789


What is command class in ado.net?

688


What is the functionality of data provider in ado.net?

677


What is difference between datagridview and datagrid control in winforms?

707


Explain how to pass multiple tables in datasets simultaneously?

760


What is the full form of ado.net?

750


What is the difference between an ADO.NET Dataset and an ADO Recordset?

796


What is the difference between Command and CommandBuilder object?

783


What is a datagridview?

733


What do you know about ado.net's objects?

708


What is ado.net components?

684


What is the default provider in ado.net?

698