I have a small bit of test code:
Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Dim connectionstring As String = "Provider=Microsoft.jet.oledb.4.0;data source=C:\PPCIS745DemoData\CallerID.mdb"
Dim con As OleDbConnection = New OleDbConnection(connectionstring)
Dim cmd As New OleDbCommand
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim connection As New OleDbConnection(connectionstring)
Try
connection.Open()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "qdelworkmaxday"
End Sub
End Class
I can't seem to get the connection to open. It does not throw and exception.
Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Dim connectionstring As String = "Provider=Microsoft.jet.oledb.4.0;data source=C:\PPCIS745DemoData\CallerID.mdb"
Dim con As OleDbConnection = New OleDbConnection(connectionstring)
Dim cmd As New OleDbCommand
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim connection As New OleDbConnection(connectionstring)
Try
connection.Open()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "qdelworkmaxday"
End Sub
End Class
I can't seem to get the connection to open. It does not throw and exception.