Ö
Özgür Çivi
"Microsoft Project 2002 Database Information" says "The process for creating
an inserted project in the database
is a combination of creating a new task and specifying the value of a custom
text field".
But i just can not insert project into another with following code.
//****BEGIN*********
// Projeye deðiþikliði bildir
sqlCmd.CommandText =
"UPDATE MSP_PROJECTS" +
" SET PROJ_EXT_EDITED = 1" +
", PROJ_EXT_EDITED_TEXT = 1" +
" WHERE PROJ_ID = " + masterProjectID.ToString();
sqlCmd.ExecuteNonQuery();
// Ýliþtirilen proje için aktivite(task) ekle
sqlCmd.CommandText =
"INSERT INTO MSP_TASKS (PROJ_ID, TASK_UID, TASK_ID, TASK_NAME," +
" TASK_IS_MILESTONE, TASK_IS_CRITICAL, TASK_IS_SUMMARY," +
" TASK_IS_SUBPROJ, TASK_IS_ROLLED_UP, TASK_IS_COLLAPSED," +
" TASK_TYPE, RESERVED_DATA, EXT_EDIT_REF_DATA)" +
" VALUES (" +
masterProjectID.ToString() +
", " + maxUID.ToString() +
", " + maxID.ToString() +
", '" + subProjectName + "'" +
", 0" +
", 1" +
", 1" +
", 1" +
", 1" +
", 1" +
", 1" +
", 0" +
", '1')";
sqlCmd.ExecuteNonQuery();
// Ýliþtirilen projeyle ilgili diðer bilgileri ekle
sqlCmd.CommandText =
"INSERT INTO MSP_TEXT_FIELDS (" +
"PROJ_ID, TEXT_CATEGORY, TEXT_REF_UID, TEXT_FIELD_ID, TEXT_VALUE" +
") VALUES (" +
masterProjectID.ToString() +
", 0" +
", " + maxUID.ToString() +
", 188743706" +
", '<>\\" + subProjectName + "'" + // subProjectID.ToString()
")";
sqlCmd.ExecuteNonQuery();
//****END*********
Code can add a task. But this task does not refer an inserted project.
I need to know what else MS Project Pro. does to insert a project into
another.
Have any idea?
Özgür Çivi
MCAD
an inserted project in the database
is a combination of creating a new task and specifying the value of a custom
text field".
But i just can not insert project into another with following code.
//****BEGIN*********
// Projeye deðiþikliði bildir
sqlCmd.CommandText =
"UPDATE MSP_PROJECTS" +
" SET PROJ_EXT_EDITED = 1" +
", PROJ_EXT_EDITED_TEXT = 1" +
" WHERE PROJ_ID = " + masterProjectID.ToString();
sqlCmd.ExecuteNonQuery();
// Ýliþtirilen proje için aktivite(task) ekle
sqlCmd.CommandText =
"INSERT INTO MSP_TASKS (PROJ_ID, TASK_UID, TASK_ID, TASK_NAME," +
" TASK_IS_MILESTONE, TASK_IS_CRITICAL, TASK_IS_SUMMARY," +
" TASK_IS_SUBPROJ, TASK_IS_ROLLED_UP, TASK_IS_COLLAPSED," +
" TASK_TYPE, RESERVED_DATA, EXT_EDIT_REF_DATA)" +
" VALUES (" +
masterProjectID.ToString() +
", " + maxUID.ToString() +
", " + maxID.ToString() +
", '" + subProjectName + "'" +
", 0" +
", 1" +
", 1" +
", 1" +
", 1" +
", 1" +
", 1" +
", 0" +
", '1')";
sqlCmd.ExecuteNonQuery();
// Ýliþtirilen projeyle ilgili diðer bilgileri ekle
sqlCmd.CommandText =
"INSERT INTO MSP_TEXT_FIELDS (" +
"PROJ_ID, TEXT_CATEGORY, TEXT_REF_UID, TEXT_FIELD_ID, TEXT_VALUE" +
") VALUES (" +
masterProjectID.ToString() +
", 0" +
", " + maxUID.ToString() +
", 188743706" +
", '<>\\" + subProjectName + "'" + // subProjectID.ToString()
")";
sqlCmd.ExecuteNonQuery();
//****END*********
Code can add a task. But this task does not refer an inserted project.
I need to know what else MS Project Pro. does to insert a project into
another.
Have any idea?
Özgür Çivi
MCAD