Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=green]' Declarations[/color]
Imports System.Data
Imports System.Data.SqlClient
[COLOR=green]' Create the conncetion string[/color]
Dim cnStr As String = "Data Source=.\SQLEXPRESS; AttachDbFilename=***; Integrated Security=True; User Instance=True"
[COLOR=green]' Create the connection[/color]
Dim cn As New SqlConnection(cnStr)
[COLOR=green]' Open it![/color]
cn.Open()
[COLOR=green]' Your query String[/color]
Dim qS as String = "SELECT ..... etc"
[COLOR=green]' The data adapter[/color]
Dim da As New SqlDataAdapter(qS, cn)
[COLOR=green]' Use it to fill a data table with the result of the qS[/color]
Dim myDataTable as DataTable
da.Fill(myDataTable)
[COLOR=green]' Release the resources[/color]
cn.Close()
cn.Dispose()
da.Dispose()