J
Jake FromStateFarm88
Guest
I am trying to create a database program to keep track of guests staying in residents apartments and I get the System.Data.OleDb.OleDbException: 'Syntax error in INSERT INTO statement.' error. Here is the part of the code it is stuck at
cmd.CommandText = "INSERT INTO Guest Registration (Name, Resident, Relationship, , Phone Number, , Apt Number, Car Info, Max Number of Days) " &
"VALUES(" & Me.txtName.Text & ",' " & Me.txtResident.Text & "','" &
Me.cboRelationship.Text & "','" & Me.txtPhone.Text & "','" &
Me.txtAptNumber.Text & "','" & Me.txtCarInfo.Text & "','" & Me.txtnumberofdays.Text & "')"
cmd.ExecuteNonQuery()
May I get some advice?
Continue reading...
cmd.CommandText = "INSERT INTO Guest Registration (Name, Resident, Relationship, , Phone Number, , Apt Number, Car Info, Max Number of Days) " &
"VALUES(" & Me.txtName.Text & ",' " & Me.txtResident.Text & "','" &
Me.cboRelationship.Text & "','" & Me.txtPhone.Text & "','" &
Me.txtAptNumber.Text & "','" & Me.txtCarInfo.Text & "','" & Me.txtnumberofdays.Text & "')"
cmd.ExecuteNonQuery()
May I get some advice?
Continue reading...