System.Data.OleDb.OleDbException was unhandled
ErrorCode=-2147217904
Message="No value given for one or more required parameters."
Below is the code for the application
' Create containers to contain Text Dim myLastName As String Dim myFirstName As String Dim myTELUSID As String Dim myWork As String Dim myCell As String Dim myEmailAddress As String 'Fill the new containers with data the user keys in
myLastName = TextBox1.Text
myFirstName = TextBox2.Text
myTELUSID = TextBox3.Text
myWork = TextBox4.Text
myCell = TextBox5.Text
myEmailAddress = TextBox6.Text
'Open database connection and prepare to add records 'Dim MyConn As New ADODB.Connection Dim strConn As StringstrConn =
"Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source= e:\GDPR-OPE.MDB;" 'MyConn.Open(strConn) 'opens database command 'now add the command to execute the database add Dim SQL As String = "INSERT INTO tblEmployees"SQL = SQL +
"(LastName,FirstName,TELUSID,Work_Number,Cell_Number,EmailAddress)"SQL = SQL +
"values("SQL = SQL +
"myLastName,myFirstName,myTELUSID,myWork,myCell,myEmailAddress)"
Dim myconn As New OleDbCommand((SQL), New OleDbConnection(strConn))
myconn.Connection.Open()
myconn.ExecuteNonQuery()
myconn.Connection.Close()