Hi
below is my code snapshot where i wanted to insert values in Inwards table, I have stores all variables like command,con in module. I am not getting any error but when i debugged then i got exception message as "Syntax error in INSERT INTO statement." plz help me,
str = "Insert Into Inwards (SerialNumber,LetterNumber,DateOfEntry,Subject,From,LetterType,AssignedTo,BeltNumber,DateOfIssue) values(" + txtSerialNo.Text.Trim + "," + txtLetterNumber.Text.Trim + ",'" + lblDate.Text.Trim + "','" + txtSubject.Text.Trim + "','" + txtFrom.Text.Trim + "','" + cbType.Text.Trim + "','" + txtAssignedTo.Text.Trim + "','" + txtBeltNumber.Text.Trim + "','" + dtDOI.Text.Trim + "')"
cmd = New OleDb.OleDbCommand(str, con)
con.Open()
cmd.ExecuteNonQuery()
MsgBox("Inserted Successfully new Inward..")
Catch ex As Exception
Finally
con.Close()
End Try