I put the code into SSMS and it underlines red for the first + sign on the first line and the PatientID
next to Convert.ToInt32
. the code is large so I'm only posting half of it since the error is on the first line.
"if not exists (select PatientID from patienttable where PatientID = " + PatientID.Text + ") begin INSERT INTO patienttable VALUES (" + Convert.ToInt32(PatientID.Text) + "','" + OldID.Text + "','"
+ PtLastName.Text
+ "','" + PtPreviousLastName.Text + "','" + PtFirstName.Text +
"','" + HomeAddress1.Text + "','"
+ HomeAddress2.Text + "','" + HomeCity.Text
+ "','" + HomeStateProvinceRegion.Text + "','"
+ HomeZip.Text + "','" + Country.Text + "','"
+ Citizenship.Text + "','" + PtHomePhone.Text + "','"
+ EmergencyPhoneNumber.Text + "','" +
PtHomeFax.Text+ "','" +Pager.Text+ "','" + EmailAddress.Text
+ "','" + PtSS.Text + "','"
+ DOB.Text + "','" + Gender.Text + "','"
+ EthnicAssociation.Text + "','" + Religion.Text + EthnicAssociation.Text + "','" + MaritalStatus.Text + "','"
+ "','" + EmploymentStatus.Text + "','" + HospitalMR.Text + "','" + DateofExpire.Text + "','" + Referral.Text + "','" + CurrentPrimaryHCPId.Text + "','" + Specialist1.Text + "','" + Specialist2.Text + "','" + Specialist3.Text + "','" + Specialist4.Text + "','" + OriginalStaffHCP.Text + "','" + CurrentStaffHCP.Text + "','" + Active.Checked + "','"
+ Comments.Text + "','" + DateEntered.Text
+ "','" + BusinessPhone.Text + "','" + BusinessFax.Text + "','" + SubscriberRelationship.Text + "','" + EmployerID.Text + "','" + NextOfKinID.Text + "','" + PtMiddleInitial.Text + "','" + NextOfKinRelationshipToPatient.Text + "','" + NoticeOfPracticePrivacy.Checked + "','" + NPPDate.Text + "','" + Suffix.Text + "')