Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Dim sql As String sql = "SELECT * FROM Departments where Customer = '" & customer & "'" ' This is our DataAdapter. This executes our SQL Statement above against the Database ' we defined in the Connection String Dim adapter As New OleDbDataAdapter(sql, con1) ' Gets the records from the table and fills our adapter with those. Dim dt As New DataTable("Departments") adapter.Fill(dt) If dt.Rows.Count = 0 Then MessageBox.Show("No record") Else ' Assigns our DataSource on the DataGridView dgv1.DataSource = dt Dim sql1 As String sql1 = "SELECT * FROM Departments" Dim adapter1 As New OleDbDataAdapter(sql1, con1) Dim cmd1 As New OleDbCommand(sql1, con1) 'Dim dt1 As New DataTable("Departments") con1.Open() Dim myreader As OleDbDataReader = cmd1.ExecuteReader myreader.Read() con1.Close() End If
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.