wp
 New Member Posts:10
 |
| 03 août 2008 08:46 |
|
Hello Philip Just started using V3 and am having problems trying to get Master/Detail working. A typical Orders (Master) and Items (Child) class relationship. On the dialog form "ORDERS Master/Details Relationships": Items is selected as the Child Table; PK_ITEMS is chosen as the Primary key; ORDER_ID is chosen as the Foreign Key; Include is checked; and the Collection Class is named "OrderItemCollection". OK is then clicked and the Master/Detail dialog closes. You can not then reopen the Master/Detail dialog. Clicking the Master/Detail "Customise" button has no effect. The resultant DLOrder.Designer.vb class has Child Methods that do not have any Parameters, for example: Public Shared Function GetItemCollectionReader(ByVal As System.Int64) As FbDataReader Public Shared Function GetItemCollectionData(ByVal As ) As List(Of DTItem) Public Shared Function GetItemCollectionCommand(ByVal As System.Int64) As FbCommand Public Shared Sub DeleteItem(ByVal As ) Public Shared Function GetDeleteItemCommand(ByVal As ) As FbCommand Private Shared Function GetItemDataset(ByVal () As System.Int64) As DataSet The same goes for other places in the Methods, for example: Parameter = New FbParameter("@ORDER_ID", FbDbType., 50) I am using Windows Vista Ultimate SP1, VS2005 Pro (Patched for Vista), CodeComplete V3.0, and Firebird 2.1.1 I hope you can help. Regards Walter |
|
|
|
|
eurowise
 Basic Member Posts:215
 |
| 03 août 2008 04:16 |
|
Hi Water Another Firebird developer has had a similar problem. This is what you need to do. During the setup of the relationship you need to make sure you specify the Child Table, the Parent Table Primary Key, the Child Table Foreign Key and the name of the BL collection. If you edit the data source in question you will notice that the PrentColumn element is missing under the Relation element. Here is how it should be (ProjectTracker) <Relation ParentPropertyMapping="Id" ParentFieldMapping="_Id" ChildPropertyMapping="ProjectId" ChildFieldMapping="_ProjectId"> <ParentColumn ColumnName="Id" SqlDataType="UniqueIdentifier" OleDbDataType="VarChar" OracleDataType="VarChar" OdbcDataType="VarChar" VistaDBDataType="VarChar" SybaseDataType="VarChar" DB2DataType="VarChar" MySqlDataType="VarChar" PostgresDataType="Varchar" FirebirdDataType="VarChar" SQLiteDataType="String" ColumnSize="16" DataType="System.Guid" IsPrimaryKey="true" IsForeignKey="false" IsSelected="true" IsAutoIncrement="false" IsTimeStamp="false" FieldMapping="_Id" PropertyMapping="Id" AllowNull="false" VBNullableDataType="System.Guid" CSharpNullableDataType="System.Guid" /> <ChildColumn ColumnName="ProjectId" SqlDataType="UniqueIdentifier" OleDbDataType="VarChar" OracleDataType="VarChar" OdbcDataType="VarChar" VistaDBDataType="VarChar" SybaseDataType="VarChar" DB2DataType="VarChar" MySqlDataType="VarChar" PostgresDataType="Varchar" FirebirdDataType="VarChar" SQLiteDataType="String" ColumnSize="16" DataType="System.Guid" IsPrimaryKey="true" IsForeignKey="false" IsSelected="true" IsAutoIncrement="false" IsTimeStamp="false" FieldMapping="_ProjectId" PropertyMapping="ProjectId" AllowNull="false" VBNullableDataType="System.Guid" CSharpNullableDataType="System.Guid" /> </Relation> When you try to edit the relashionship it fails to load but unfortunately does not generate an error. We will try and fix that in the next version. The current version of Code Complete does not automatically generate the relationship in the case of Firebird. We will try and fix that in the next version. I hope this helps Regards Philip |
|
|
|
|
KeithK
 New Member Posts:6
 |
| 16 déc. 2008 05:08 |
|
Hi, I have just purchased CC specifically for use with FireBird and am having the same problem when trying to use/generate relationships. When is a fix going to be available? I have downloaded and am using v3.0 Thanks, Keith |
|
|
|
|
eurowise
 Basic Member Posts:215
 |
| 17 déc. 2008 01:46 |
|
It is fixed in 3.5. Have you tried using the Beta2? Philip |
|
|
|
|
KeithK
 New Member Posts:6
 |
| 17 déc. 2008 04:21 |
|
Hi Philip, No - not yet - I will download it right away - thanks for the response. Keith
|
|
|
|
|