R
Rafael
I'm receiving this error from the code below.
Unclosed quotation mark before the character string '+1)'.
Line 1: Incorrect syntax near ' + 1)'.).
string InsertDeptType = "INSERT INTO Department(Department_Id,
Department_Desc, Ok_To_Use)"+
" values ('"+ Guid.NewGuid().ToString() +
"','" + drDeptType["DEPT"].ToString()+
"',' + 1)";
SqlCommand cmdInsertDeptType = new SqlCommand(InsertDeptType,
connDestination);
cmdInsertDeptType.ExecuteNonQuery();
Unclosed quotation mark before the character string '+1)'.
Line 1: Incorrect syntax near ' + 1)'.).
string InsertDeptType = "INSERT INTO Department(Department_Id,
Department_Desc, Ok_To_Use)"+
" values ('"+ Guid.NewGuid().ToString() +
"','" + drDeptType["DEPT"].ToString()+
"',' + 1)";
SqlCommand cmdInsertDeptType = new SqlCommand(InsertDeptType,
connDestination);
cmdInsertDeptType.ExecuteNonQuery();