Guid PrimeKey as Row Guid for Replication


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
I am using Guid's a Primary Keys and also as Rowguid's for replication. The issue is on update's, If a field is specifed as rowguid it cannot be updated so the update fails.

I made the following changes to make this work can you please add to your code so I dont break at next update? or let me know how and what you want to change so I dont get a suprise next update Smile

Thanks

Paul

To Business layer I added this Property. (with a private as well)

''' <summary>

''' Gets or sets a value that determines whether the primary key for this business object is

''' a RowGuid

''' </summary>

''' <value></value>

''' <returns></returns>

''' <remarks></remarks>

<Category(EDITOR_CATEGORY_CRUD), _

DefaultValue(True), _

Description("Determines whether the primary key for this business object is a RowGuid.")> _

Public Property PrimaryKeyIsRowGuid() As Boolean

Get

Return Me._PrimaryKeyIsRowGuid

End Get

Set(ByVal value As Boolean)

Me._PrimaryKeyIsRowGuid = value

End Set

End Property

 

And in Data Layer

In method BuildUpdateInfo aroung line 573

'----------------------> Paul made a change the code here from

'--this

'-- Add the pk field to the fields to update if the primary key if not

' auto incremented

' If Not Me._BusinessObject.PrimaryKeyIsAutoIncremented Then

' loInfo.Fields.Add(lcFieldName)

' End If

'---> to

'-- Add the pk field to the fields to update if the primary key if not

' auto incremented or Row-Guid

If Not Me._BusinessObject.PrimaryKeyIsAutoIncremented AndAlso Not Me._BusinessObject.PrimaryKeyIsRowGuid Then

loInfo.Fields.Add(lcFieldName)

End If


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Paul Chase - 17 Years Ago
Chan - 17 Years Ago
Paul Chase - 17 Years Ago
                 Paul, did you try adding the PK field name to the...
StrataFrame Team - 17 Years Ago
Paul Chase - 17 Years Ago
Richard Keller - 17 Years Ago
Richard Keller - 17 Years Ago
Paul Chase - 17 Years Ago
Richard Keller - 17 Years Ago
             Hi,
Any other comments?
Chan - 17 Years Ago
Paul Chase - 17 Years Ago
Peter Jones - 17 Years Ago
Paul Chase - 17 Years Ago
Peter Jones - 17 Years Ago
StrataFrame Team - 17 Years Ago
                 ThanksBen that should work!
Paul Chase - 17 Years Ago
Paul Chase - 17 Years Ago
Richard Keller - 17 Years Ago
StrataFrame Team - 17 Years Ago
Paul Chase - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                         Yep I know how it is:) Thanks for getting this in the next build for...
Paul Chase - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search