Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
Dim sqlquery As String = "INSERT INTO firstfloor_house_rent (datee,amt) VALUES ('" & DateTimePicker8.Text & "', " & TextBox24.Text & ")"
Dim sqlcommand As New OleDbCommand
With sqlcommand
.CommandText = sqlquery
.Connection = conn
End With
ans = sqlcommand.ExecuteNonQuery()
If (ans = True) Then
'message added
MessageBox.Show("Sucessfully added", "Sucess", MessageBoxButtons.OK)
Else
MessageBox.Show("failed to add record", "Error!!!", MessageBoxButtons.OK) '' error
End If
End Sub
what is data type mismatch in this query. it gives data type mismatch in criteria expression.. plz help...