bhummel
asked on
Oracle, RDO Updateable RS and .AddNew
Greetings,
I'm having a little problem with an Updateable RDO
resultset (rdOpenKeySet, rdrdConcurBatch). My .Update and .BatchUpdate work fine for Updates.
My .AddNew & .Update work fine for Adds but when I try to .BatchUpdate after an .AddNew has occurred I receive the following error:
Client Cursor:20 Cannot perform Update with an empty row.
Here is my Add code(the top portion is because there is a join in the rs):
rsPromoCust("TypeID").Sour ceTable = "TypePromotions"
rsPromoCust("TypeID").KeyC olumn = True
rsPromoCust("PromotionID") .SourceTab le = "TypePromotions"
rsPromoCust("PromotionID") .KeyColumn = True
rsPromoCust("DeActivatedOn ").SourceT able = "TypePromotions"
rsPromoCust("StartDate").S ourceTable = "TypePromotions"
rsPromoCust("EndDate").Sou rceTable = "TypePromotions"
rsPromoCust.AddNew
rsPromoCust("TypeID") = "" & CustDetail & ""
rsPromoCust("PromotionID") = "" & Promo & ""
rsPromoCust("StartDate") = Format(StartDate, "DD-MMM-YY")
rsPromoCust("EndDate") = Format(EndDate, "DD-MMM-YY")
rsPromoCust("TypeID") = "" & CustDetail & ""
rsPromoCust.Update
Any help would be appreciated.
Thanks,
Brad
I'm having a little problem with an Updateable RDO
resultset (rdOpenKeySet, rdrdConcurBatch). My .Update and .BatchUpdate work fine for Updates.
My .AddNew & .Update work fine for Adds but when I try to .BatchUpdate after an .AddNew has occurred I receive the following error:
Client Cursor:20 Cannot perform Update with an empty row.
Here is my Add code(the top portion is because there is a join in the rs):
rsPromoCust("TypeID").Sour
rsPromoCust("TypeID").KeyC
rsPromoCust("PromotionID")
rsPromoCust("PromotionID")
rsPromoCust("DeActivatedOn
rsPromoCust("StartDate").S
rsPromoCust("EndDate").Sou
rsPromoCust.AddNew
rsPromoCust("TypeID") = "" & CustDetail & ""
rsPromoCust("PromotionID")
rsPromoCust("StartDate") = Format(StartDate, "DD-MMM-YY")
rsPromoCust("EndDate") = Format(EndDate, "DD-MMM-YY")
rsPromoCust("TypeID") = "" & CustDetail & ""
rsPromoCust.Update
Any help would be appreciated.
Thanks,
Brad
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Having said that... why don't you just move the code after the .AddNew to before the .AddNew and leave the .Update out altogether?
Or could it be that .Update is actually the wrong method and you intended to do something different? (You are talking about BatchUpdate in your question)
ASKER
Actually, what I want to do is all of my updates as well as any adds and then use a .BatchUpdate to Commit the changes through a save button or .CancelBatch to cancel all of the changes through a cancel button.
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
ASKER
Actually, what I want to do is all of my updates as well as any adds and then use a .BatchUpdate to Commit the changes through a save button or .CancelBatch to cancel all of the changes through a cancel button.
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
ASKER
Actually, what I want to do is all of my updates as well as any adds and then use a .BatchUpdate to Commit the changes through a save button or .CancelBatch to cancel all of the changes through a cancel button.
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
ASKER
Actually, what I want to do is all of my updates as well as any adds and then use a .BatchUpdate to Commit the changes through a save button or .CancelBatch to cancel all of the changes through a cancel button.
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
BatchUpdate does this for changes. My problem is with the Add's. Where does the .AddNew place the record in the rs?
Thanks,
Brad
.AddNew doesn't place the record in the rs
To retrieve the newly added record in an rs you'll have to re-create an rs
To retrieve the newly added record in an rs you'll have to re-create an rs