If you guys want to learn the most efficient technique for reading data from SQL server then checkout sqldatareader class.
the beauty is that multiple queries can be assinged and jumped from one to another.. if your purpose is just to show data in application this is the most efficient solution
Example:-
Dim myreader as sqlclient.sqldatareader
sqlcommand1.commandtext="your query"
sqlconnection1.open
myreader = sqlcommand.executereader
myreader.read()
'at this stage the data is now read its now time to display it
label1.text = myreader("col1")
label2.text = myreader("col2")
..
..
sqlconnection1.close
Happy Surfing;yep, I use that. I <3 it.
the beauty is that multiple queries can be assinged and jumped from one to another.. if your purpose is just to show data in application this is the most efficient solution
Example:-
Dim myreader as sqlclient.sqldatareader
sqlcommand1.commandtext="your query"
sqlconnection1.open
myreader = sqlcommand.executereader
myreader.read()
'at this stage the data is now read its now time to display it
label1.text = myreader("col1")
label2.text = myreader("col2")
..
..
sqlconnection1.close
Happy Surfing;yep, I use that. I <3 it.