I get this error when I run my program
OLEDB Exception Unhandled Syntax error in INSERT INTO statement
but I can't spot the error
This is my code:
Dim pictureData As Byte()
Using ms As New MemoryStream
PICPictureBox.Image.Save(ms, Imaging.ImageFormat.Jpeg)
pictureData = ms.ToArray()
End Using
strsql1 = "insert into criminallist (CC#, FIRSTNAME, MIDDLENAME, LASTNAME, QUALIFIERS, ALIAS, GENDER, LASTKNOWNADDRESS, CRIMINALACTIVITY, CRIMINALINVOLVEMENT, AREAOFOPERATION, ISSUINGCOURT, REMARKS, DATEOFJAIL, TRACKERTEAM, PIC)values(@a0,@a1,@a2,@a3,@a4,@a5,@a6,@a7,@a8,@a9,@a10,@a11,@a12,@a13,@a14,@a15)"
acscmd1.CommandText = strsql1
acscmd1.Connection = acsconn1
acscmd1.Parameters.AddWithValue("@a0", CC_TextBox.Text)
acscmd1.Parameters.AddWithValue("@a1", FIRSTNAMETextBox.Text)
acscmd1.Parameters.AddWithValue("@a2", MIDDLENAMETextBox.Text)
acscmd1.Parameters.AddWithValue("@a3", LASTNAMETextBox.Text)
acscmd1.Parameters.AddWithValue("@a4", QUALIFIERSComboBox.SelectedItem)
acscmd1.Parameters.AddWithValue("@a5", ALIASTextBox.Text)
acscmd1.Parameters.AddWithValue("@a6", GENDERComboBox.SelectedItem)
acscmd1.Parameters.AddWithValue("@a7", LAST_KNOWN_ADDRESSTextBox.Text)
acscmd1.Parameters.AddWithValue("@a8", CRIMINAL_ACTIVITYTextBox.Text)
acscmd1.Parameters.AddWithValue("@a9", CRIMINAL_INVOLVEMENTTextBox.Text)
acscmd1.Parameters.AddWithValue("@a10", AREA_OF_OPERATIONTextBox.Text)
acscmd1.Parameters.AddWithValue("@a11", ISSUING_COURTTextBox.Text)
acscmd1.Parameters.AddWithValue("@a12", REMARKSTextBox.Text)
acscmd1.Parameters.AddWithValue("@a13", DateTimePicker1.Value.Date)
acscmd1.Parameters.AddWithValue("@a14", TRACKER_TEAMTextBox.Text)
acscmd1.Parameters.AddWithValue("@a15", pictureData)
acscmd1.ExecuteNonQuery()
acscmd1.Dispose()
MessageBox.Show("ADDED")