VBdotnet2005
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
forgot to change the example to your names..sorry
Or, using the Microsoft Data Access Application block...
Dim DS as New Dataset
SqlHelper.FillDataset(Conn ectionStri ng, CommandType.Text, "SELECT * FROM urTable", DS, New String() {"Table Name"})
Me.datagrid1.DataSource = DS
Me.datagrid1.DataMember = "Exceptions"
Dim DS as New Dataset
SqlHelper.FillDataset(Conn
Me.datagrid1.DataSource = DS
Me.datagrid1.DataMember = "Exceptions"