skillzbabs 0 Newbie Poster

Please the suggested article does not provide solution to my problem.
Please I need your help and it is very urgent, I have a data mismatch error in criteria expression. I have a variable of data type string which I added to my OleDbcommand object the code is below:

'This is the variable I assigned values to'
Dim E, I As String
'In my database I have a table called Registrationtb with 4 fields of data type Text

Dim command As OleDbcommand = New OleDbcommand ("INSERT INTO Registrationtb (fname, expiry, initiald, surname) VALUES (?, ?, ?, ?)",conn)

Command.Parameters.Add("@fname", OleDbType.VarChar, 255).Value= txtfname.Text

Command.Parameters.Add("@surname", OleDbType.VarChar, 255).Value= txtsurname.Text

Command.Parameters.Add("@expiry", OleDbType.VarChar, 255).Value= E.ToString

Command.Parameters.Add("@initiald", OleDbType.VarChar, 255).Value= I.ToString

Before I included the E and I variable, the query was working perfect.
I guess the problem is from the 2 last line of my code I.e. E.ToString, I.ToString.