fill datagridview in
  • i am working on windows application project i am using datagridview in it i want to how can i fill datagridview from database in
  • 1 Comment sorted by
  • Vote Up0Vote Down WaqasWaqas
    172.00 Karma Accepted Answer
    Hi @saeed you can try this below code by @hussainroyal

    Dim SQLStr As String
    Dim ConStr As String
    SQLStr = "select * from members"
    ConStr = "Data Source=.\sqlexpress; initial catalog=ABDB; Integrated Security=true"
    Dim sqlConn As New System.Data.SqlClient.SqlConnection(ConStr)
    Dim ds As New DataSet
    Dim SQLAdapter As New System.Data.SqlClient.SqlDataAdapter(SQLStr, ConStr)
    DataGridView1.DataSource = ds

    - See more at:

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week

    Optimum Creative