Try
Dim sqlconn As New OleDb.OleDbConnection
Dim sqlquery As New OleDb.OleDbCommand
connstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Plan.mdb"
sqlconn.ConnectionString = connstring
sqlquery.Connection = sqlconn
sqlconn.Open()
sqlquery.CommandText = "INSERT INTO Elementary([SchoolName],[KM],[KF],[KT],[G1M],[G1F],[G1T],[G2M],[G2F],[G2T],[G3M],[G3F],[G3T],[G4M],[G4F],[G4T],[G5M],[G5F],[G5T],[G6M],[G6F],[G6T],[ESTOTAL],[SY])VALUES(@Schoolname,@KM,@KF,@KT,@G1M,@G1F,@G1T,@G2M,@G2F,@G2T,@G3M,@G3F,@G3T,@G4M,@G4F,@G4T,@G5M,@G5F,@G5T,@G6M,@G6F,@G6T,@ESTOTAL,@SY)"
sqlquery.Parameters.AddWithValue("@SchoolName", SchoolNameTextBox.Text)
sqlquery.Parameters.AddWithValue("@KM", G1MTextBox.Text)
sqlquery.Parameters.AddWithValue("@KF", G1MTextBox.Text)
sqlquery.Parameters.AddWithValue("@KT", G1MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G1M", G1MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G1F", G1FTextBox.Text)
sqlquery.Parameters.AddWithValue("@G1T", G1TTextBox.Text)
sqlquery.Parameters.AddWithValue("@G2M", G2MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G2F", G2FTextBox.Text)
sqlquery.Parameters.AddWithValue("@G2T", G2TTextBox.Text)
sqlquery.Parameters.AddWithValue("@G3M", G3MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G3F", G3FTextBox.Text)
sqlquery.Parameters.AddWithValue("@G3T", G3TTextBox.Text)
sqlquery.Parameters.AddWithValue("@G4M", G4MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G4F", G4FTextBox.Text)
sqlquery.Parameters.AddWithValue("@G4T", G4TTextBox.Text)
sqlquery.Parameters.AddWithValue("@G5M", G5MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G5F", G5FTextBox.Text)
sqlquery.Parameters.AddWithValue("@G5T", G5TTextBox.Text)
sqlquery.Parameters.AddWithValue("@G6M", G6MTextBox.Text)
sqlquery.Parameters.AddWithValue("@G6F", G6FTextBox.Text)
sqlquery.Parameters.AddWithValue("@G6T", G6TTextBox.Text)
sqlquery.Parameters.AddWithValue("@ESTOTAL", ESTOTALTextBox.Text)
sqlquery.Parameters.AddWithValue("@SY", SYTextBox.Text)
sqlquery.ExecuteNonQuery()
sqlconn.Close()
ElementaryTableAdapter.Fill(PlanDataSet.Elementary)
MessageBox.Show("School Added")
Update()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try