Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27513

Printout of table1 on the Form1

$
0
0
I want to use DataGridView like GridView in ASP.net.

I draged the toolbox DataGridview to the Form.

I linked it with my database.

How do I get a printout of table1 on the Form1?

My connection string works.

Code:

Using conn As New SqlConnection(connStr)
      conn.Open()
      Using sqlDA As New SqlDataAdapter("SELECT * FROM [table1];", conn)
          Dim dt As New DataTable()
          sqlDA.Fill(dt)

          sqlDA.Dispose()
    End Using
End Using


Viewing all articles
Browse latest Browse all 27513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>