Search found 90 matches: editbaserecord

Return to advanced search

Re: oRs:EditBaseRecord, oRec:Save() problem

I have made the following change in the EditItems function. Instead of using oRec:Save() directly, I have add another function ItemSaved() and Ithink the problem solved. I have used the original datarow.prg. Of course some more lines like oRsItems:ReSync(), oBrw:RefreshCurrent() is needed. static fu...
by betoncu
Sun Aug 26, 2018 10:20 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

Mr. Rao, since the oRec:Save() returns false the execution waits in the edit dialog.
In this case there is nothing to do in the edit dialog.
Instead of waiting in the edit dialog, may be we have to show an error message that says record has been deleted by another user and go back to browse.
by betoncu
Sun Aug 26, 2018 10:01 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

This is what is happening in my tests: If the save fails due to some reason like duplicated unique field, the record pointer does not change and edited values are not lost. They are retained. If the save fails because the record is deleted by another user on the network, then the record pointer is m...
by nageswaragunupudi
Sun Aug 26, 2018 9:46 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

The record pointer goes to the first record and changes all of the fields of oRec with the values of first record and I loose everything that I have typed.
by betoncu
Sun Aug 26, 2018 9:40 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

Thanks for the feedback. Now, please change the entire method SaveOBJ() in datarow.prg with this new method. METHOD SaveOBJ() CLASS TDataRow   local lSaved      := .t.   local lNetChanged := .f.   local aSaveData   := {}   if ::lReadOnly .or. ! ::Modified()      return .f. ...
by nageswaragunupudi
Sun Aug 26, 2018 4:35 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

Dear Rao,

The problem described in the link below came back
viewtopic.php?f=3&t=33908&start=15#p201244
by betoncu
Sun Aug 26, 2018 2:28 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

Can you please make this modification in \fwh\source\classes\datarow.prg and test? Please locate the following lines towards the end of method SaveOBJ()      if !lSaved         AEval( ::aData, { |a,i| a[ 2 ] := aSave[ i ] } )&...
by nageswaragunupudi
Sat Aug 25, 2018 3:47 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord, oRec:Save() problem

We are looking into this.
by nageswaragunupudi
Fri Aug 24, 2018 7:23 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

oRs:EditBaseRecord, oRec:Save() problem

I have explained the problem step by step as below: Please, run the mariainv example of Mr. Rao 1. Open items and position the cursor on an item 2. Press the edit button and open the edit dialog 3. Now, when we are waiting here, another user has deleted the record that we are editing. 4. Edit the re...
by betoncu
Thu Aug 23, 2018 7:13 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord, oRec:Save() problem
Replies: 8
Views: 1154

Re: oRs:EditBaseRecord

Hi Villian,

I have finally modified my code to use EditBaseRecord method. It works good. I can add, update or delete records.

Thank you very much.
by Horizon
Mon Aug 20, 2018 7:11 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord
Replies: 4
Views: 563

Re: oRs:EditBaseRecord

Hi,
oRs is a rowset object, that you can create doing something like this:

oRs := oBD:Query("SELECT * FROM customers")

I'm using editbaserecord, oRec AND oRs with FWHMYSQL. oBD IS a conecction WIth a MySql Server.
by vilian
Mon Aug 20, 2018 2:16 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord
Replies: 4
Views: 563

Re: oRs:EditBaseRecord

vilian wrote:May be this can help you:

oRs:EditBaseRecord(NIL,.T.,{|oRec| MyFunc(oRec)}, oLbx)


How Can I create oRec? (I don't use editbaserecord, I want to convert my function) Is it oRs?

Thanks,
by Horizon
Sun Aug 19, 2018 2:30 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord
Replies: 4
Views: 563

Re: oRs:EditBaseRecord

May be this can help you:

oRs:EditBaseRecord(NIL,.T.,{|oRec| MyFunc(oRec)}, oLbx)
by vilian
Sun Aug 19, 2018 2:09 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord
Replies: 4
Views: 563

oRs:EditBaseRecord

Hi Mr. Rao, I have a similiar function in my program using DBF files. I have searched the "EditBaseRecord" function but I can't found in source of fwh directory. I think it is one of the hidden functions. Can you please share part of how to call "EditBaseRecord" ...
by Horizon
Sat Aug 18, 2018 3:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: oRs:EditBaseRecord
Replies: 4
Views: 563

Re: FWHMYSQL oRs:Save() Problem

... AUTOSORT NOBORDER         oBrw:CreateFromCode()         @ 20,20 BUTTON "TEST" SIZE 100,30 PIXEL OF oDlg ;            ACTION oRs:EditBaseRecord(NIL,.F.,{|oRec| TestSave(oRec)},oBrw)      ACTIVATE DIALOG oDlg CENTERED   ENDIF   oRs:Close()   oCn:Close()  ...
by vilian
Thu May 03, 2018 5:37 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: FWHMYSQL oRs:Save() Problem
Replies: 12
Views: 2379
PreviousNext

Return to advanced search