I'm a beginner when it comes to VB.net. I can do all the basic stuff, but I'm having issues with connecting to a database I've created. Ultimately, I need to feed data from a few text boxes to one table within the database, but I can't even get the connection open.
For Public Class Log, I have the following:
Public Class Log Dim con As New OleDb.OleDbConnection Dim conStr As String
I have the following code connected to a button click.
Try con = New OleDb.OleDbConnection con.ConnectionString = "Provider = Microsoft.Jet.OleDB.4.0;" + "Data Source =c:\Users\God\QualityLog.accdb" con.Open() MsgBox("Connection Open") con.Close() MsgBox("Connection Closed") Catch ex As Exception MsgBox(ex.Message) End Try
From this, I get unreconized database format from this.
Right now, I just need to make sure im correctly opening the connection and then I'll worry about exporting the data from text boxes to the table in access. Any help is greatly appreciated!
Edited 4 Years Ago by theboyandtheocean