Alright, I have picked up everything I know for VB.Net from trial and error. I have built an SQL string that works in Access and tried to implement it, however it doesn't seem to work in my program. I totally accept that I don't have a firm grasp on it, so what am I doing wrong? This particular form just needs to take the text from textboxes in a Windows form and insert them into a database.
Dim insertSql As String = "INSERT INTO StudentTable VALUES ('" + BadgeNoTextBox.Text + "','" + FirstNameTextBox.Text + "','" + LastNameTextBox.Text + "','" + SAPSIDTextBox.Text + "','" + EmailTextBox.Text + "'.'" + PhoneTextBox.Text + "','" + CollegeComboBox.Text + "')"
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""C:\Users\larsennicholasg\Documents\Visual Studio 2012\Projects\SSCLogin\SSCLogin\My Project\SSCStudent.mdb"""
Dim da As New OleDbDataAdapter(insertSql, conn)
If (da.Update(ds)) Then
MessageBox.Show("Success")
Else
MessageBox.Show("Fail")
End If
Any ideas?
da.ExecuteNonQuery();