Professional Documents
Culture Documents
With The Appropriate Line/S of Code. OLEDB Connection Syntax
With The Appropriate Line/S of Code. OLEDB Connection Syntax
Score:_______________
Student must be
1. Able to create a MS Access Database.
2. Able to establish connection between the database and the VB application or project.
3. Able to display sample records from the database to the listview in the VB
project(Application)
4. REPLACE missing_code WITH THE APPROPRIATE LINE/S OF CODE.
OLEDB Connection Syntax
Try
With (missing_code)
If .State = (missing_code).Closed Then
.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=../(missing_code);"
.Open()
MsgBox("Connected")
End If
End With
Catch ex As Exception
MsgBox(ex.Message)
End Try
While missing_code.Read
With ListView1
.Items.Add(missing_code("missing_code "))
With .Items(.Items.Count - 1).SubItems
.Add(missing_code("missing_code"))
End With
End With
End While
End Sub