VB.NET Tutorials – Load Data Into DataGridView From SQL Server Database




About this tutorial:

Video duration: 11:40
VB.NET Tutorials – Load Data Into DataGridView Control From Sql Server Database

Post Author: OfficeTutes.com

Apple lover, ICT and LEAN consultant, MS Office lecturer My other website with video tutorials - Tutorials, guides and news for iPhones and iPads

15 thoughts on “VB.NET Tutorials – Load Data Into DataGridView From SQL Server Database

    Kima

    (September 15, 2019 - 7:16 am)

    I got an error.. 'Use the "new" keyword to create an object instance' please help me….

    Jasper Silva

    (September 15, 2019 - 7:16 am)

    Can you tutorial how to connect database into datagridview? Thank you.

    Mohamed Bhelil

    (September 15, 2019 - 7:16 am)

    the keyboard noise is awful, i couldn't focus!

    azeedo

    (September 15, 2019 - 7:16 am)

    Thank you for the video, How do I go about using employee number as a filter to get just one record?

    jonas tinay

    (September 15, 2019 - 7:16 am)

    Thank You So Much!
    This video is very helpful.

    Mark Noel Villanueva

    (September 15, 2019 - 7:16 am)

    why i can't connect to the PC SERVER in dataconnections? i can't load the the database

    Dave Patrick

    (September 15, 2019 - 7:16 am)

    Very nice! Thanks for doing this tutorial. It was very helpful.

    Brett Ferguson

    (September 15, 2019 - 7:16 am)

    Thanks for the excellent video! For everyone, here's the code to copy – paste:

    Imports System.Configuration
    Imports System.Data.SqlClient

    Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    EmployeeListDataGridView.DataSource = GetEmployeesList()
    End Sub

    Private Function GetEmployeesList() As DataTable
    Dim dtEmployees As New DataTable
    Dim connString As String = ConfigurationManager.ConnectionStrings("dbx").ConnectionString
    Using conn As New SqlConnection(connString)
    Using cmd As New SqlCommand("SELECT * FROM dbo.Employees", conn)
    End Using
    End Using
    Return dtEmployees

    End Function
    End Class

    Michelle El Khoury

    (September 15, 2019 - 7:16 am)

    It didn’t work for me. “ArgumentException was unhandled. An unhandled exception of type ‘System.ArguementException’ occurred in System.Data.dll. Additional information: Keyword not supported: ‘port’” I didn’t use port in it

    Jonnel Vanguardia

    (September 15, 2019 - 7:16 am)

    THANKS A LOT <3 <3 <3

    Christian Joaquin

    (September 15, 2019 - 7:16 am)

    Thank you very much :>

    Droopi the dog

    (September 15, 2019 - 7:16 am)

    loved it thank you so much ….

    Mayuresh Shetty

    (September 15, 2019 - 7:16 am)

    Thanks
    Your tutorial proved very helpful to me

    PalmIt

    (September 15, 2019 - 7:16 am)

    Altering app config: "The 'ConnectionString' attribute is not allowed."

    Karina Marpaung

    (September 15, 2019 - 7:16 am)

    Thanks so much!

Leave a Reply

Your email address will not be published. Required fields are marked *