Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

fill datagrid

i am working on VB.NET windows application.
In my windows form i have a one Datagrid
I want to  fill  this datagrid from my database, called "Sample1". How can I accomplish this task?  I created data connection in Server Explorer. Sample1.dbo - Tables  ---> Addresses
ASKER CERTIFIED SOLUTION
Avatar of razorback041
razorback041
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
forgot to change the example to your names..sorry
Avatar of JRossi1
JRossi1

Or, using the Microsoft Data Access Application block...

Dim DS as New Dataset

SqlHelper.FillDataset(ConnectionString, CommandType.Text, "SELECT * FROM urTable", DS, New String() {"Table Name"})
Me.datagrid1.DataSource = DS
Me.datagrid1.DataMember = "Exceptions"