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

How will you differentiate between ADO (ActiveX Data Object) and RDO (Remote Data Objects)?

650


What is untyped dataset?

606


Which one of the following objects is a high-level abstraction of the connection and command objects in ado.net?

646


Is ado.net an orm?

574


What is a serialized object?

590






How can we load multiple tables in a dataset?

605


How would you connect to a database by using .NET?

549


What is connection in ado.net?

590


Explain how to create dynamic gridview?

574


What are the various methods provided by the DataSet object to generate XML?

665


What is the role of clr?

596


What is ado.net object model?

565


Which provider is used to connect ms access, oracle, etc…?

586


Explain advantages of ado.net?

639


What is ole used for?

549