Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.
Imports System.Data.SqlClient Imports System.Data.SqlClient.SqlCommand Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim cnn As SqlConnection = New SqlConnection Try Dim strCnn As String = "Server='Mike-Vaio';Database='NORTHWND.MDF';Trusted_Connection=True;" Dim cmd As SqlCommand = New SqlCommand("Select * From tblProduct", cnn) cnn.ConnectionString = strCnn cnn.Open() Dim dr As SqlDataReader = cmd.ExecuteReader If dr.HasRows Then MessageBox.Show("Has Records") Else MessageBox.Show("Has no Records") End If ' DataTable dt = new DataTable(); 'dt.Load(dr); 'dataGridView1.DataSource = dt; Catch ex As Exception MessageBox.Show(ex.Message) Finally cnn.Close() End Try End Sub End Class
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.