Please help me. I am trying to insert into mysql database, but it is throwing this error. Fatal error encounter during command execution.
this is the sample of code am trying to run
cn.Open()
cmd.Connection = cn
cmd.CommandText = "insert into corps(callup,statecode,surname,firstname,othername) values(?,?,?,?,?)
With cmd.Parameters
.Add("@callup", OleDbType.VarChar).Value = txtcallupno.Text
.Add("@statecode", OleDbType.VarChar).Value = txtstatecode.Text
.Add("@surname", OleDbType.VarChar).Value = txtsurname.Text
.Add("@first", OleDbType.VarChar).Value = txtfirstname.Text
.Add("@othername", OleDbType.VarChar).Value = txtothername.Text
End With
cmd.ExecuteNonQuery()
cmd.Parameters.Clear()
cn.Close()
if am using access database, this code run very smooth and fine, but when i change my database to mysql, i am having this error.please help me, if i need to add anything else. Thanks