J
JohnK
Dear All,
I am struggling to join two recordsetdefs:
sSQL1 = "SELECT AssignmentUniqueID , AssignmentResourceName FROM
Assignments WHERE AssignmentRemainingWork>0"
sSQL2 = "SELECT AssignmentUniqueID, AssignmentTimeActualWork ,
AssignmentTimeWork, AssignmentTimeStart FROM AssignmentTimephasedByDay
WHERE AssignmentTimeWork>AssignmentTimeActualWork"
Data1.ConnectionString = "Provider=Microsoft.Project.OLEDB.11.0;Project
Name=Master.mpp"
set rsdef1 = Data1.RecordsetDefs.AddNew(sSQL1,
Data1.Constants.dscCommandText, "AssignmentParent")
set rsdef2 = Data1.RecordsetDefs.AddNew(sSQL2,
Data1.Constants.dscCommandText, "AssignmentDetails")
Set rsdef3 = Data1.SchemaRelationships.Add("Joined",
Data1.SchemaRowsources.item(0),Data1.SchemaRowsources.item(1),
Data1.SchemaRowsources.item(0).SchemaFields(0)
,Data1.SchemaRowsources.item(1).SchemaFields.item(0))
Can anyone show me how to get two recordsets to be joined by
AssignmentUniqueID?
Thanks for your help.
Best Wishes, John.
I am struggling to join two recordsetdefs:
sSQL1 = "SELECT AssignmentUniqueID , AssignmentResourceName FROM
Assignments WHERE AssignmentRemainingWork>0"
sSQL2 = "SELECT AssignmentUniqueID, AssignmentTimeActualWork ,
AssignmentTimeWork, AssignmentTimeStart FROM AssignmentTimephasedByDay
WHERE AssignmentTimeWork>AssignmentTimeActualWork"
Data1.ConnectionString = "Provider=Microsoft.Project.OLEDB.11.0;Project
Name=Master.mpp"
set rsdef1 = Data1.RecordsetDefs.AddNew(sSQL1,
Data1.Constants.dscCommandText, "AssignmentParent")
set rsdef2 = Data1.RecordsetDefs.AddNew(sSQL2,
Data1.Constants.dscCommandText, "AssignmentDetails")
Set rsdef3 = Data1.SchemaRelationships.Add("Joined",
Data1.SchemaRowsources.item(0),Data1.SchemaRowsources.item(1),
Data1.SchemaRowsources.item(0).SchemaFields(0)
,Data1.SchemaRowsources.item(1).SchemaFields.item(0))
Can anyone show me how to get two recordsets to be joined by
AssignmentUniqueID?
Thanks for your help.
Best Wishes, John.