Change BO mode


Author
Message
Doug Zapp
Doug Zapp
StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)
Group: Forum Members
Posts: 39, Visits: 225
Hi,

I would like to have the ability to create a new row in a BO, save the data, continue working on the BO, then save it again.  Thus the initial save would perform an Insert, and the subsequent saves would perform an Update.  I'd rather not reset the BO and re-retrieve it, etc. 

Is there a flag on the BO to set whether the BO saves via Insert or Update?  If so, please fill in the details.

Addendum:  I should also note that my reason for this is on the second save, I'm getting a duplicate row created, or a second call to the Insert.

Thank you.

Doug Zapp
Edited 13 Years Ago by Doug Zapp
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Doug,

Please post the code you are using because the BO already works the way you are describing, you insert a record with bo.NewRow() or bo.Add, then you can bo.Save the record, modify the current record in the BO, then bo.Save as many times as you want, as long as you don't move the bo.CurrentRowIndex, you will be in the same record you added.

Edhy Rijo

Doug Zapp
Doug Zapp
StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)StrataFrame Novice (101 reputation)
Group: Forum Members
Posts: 39, Visits: 225
I guess that is it then.  The BO is bound to a combobox, which I allow to change.  Thus prompting the change in index.

Suggestions?
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Sorry, but I cannot clearly see the problem.  If you could post a simply VB sample using the StrataFrameSample application I would see it and help you.

Now, you said you are using a Combobox to add records? if that is the case, you want to do a save on each new record? or simply want the end user to enter as many records as they want and do a single save for each?

Like I say, it is not clear to me what you really trying to accomplish, a sample will be the best way to help you out.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search