Here is the code you can use to retrieve data from a SQL database.
VB.NET - Retrieve data from SQL database
-----------------------------------------------
Imports System.Data.SqlClient
Imports System.Configuration
'You can add data source to Visual Studio project and then get connection string or name from App.config file
Dim connectionString As String = ConfigurationManager.ConnectionStrings("TestProject.My.MySettings.DatabaseConnectionString").ConnectionString
Dim SQLstatement As String = "SELECT * FROM tableName"
Dim connection As New SqlConnection(connectionString)
Dim command As SqlCommand = New SqlCommand(SQLstatement, connection)
Dim adapter As New SqlDataAdapter
connection.Open()
Dim dt As New DataTable
adapter.SelectCommand = command
adapter.Fill(dt)
En esta página del sitio puede ver el video en línea VB.NET - Retrieve data from SQL database de Duración hora minuto segunda en buena calidad , que subió el usuario KnowledgeIsCool 20 julio 2014, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 5,810 veces y le gustó 6 a los espectadores. Disfruta viendo!