Page 2 of 2

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 1:14 pm
by mol
I'm using virtual grid mostly in my last app. It works very quickly, especially with LetoDBF for serving data.

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 2:37 pm
by mlnr
Thank you Serge and Marek,

When did you save the data? After you have finished the work with grid or on the fly?

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 3:29 pm
by serge_girard
In my case the data in the grid is compared against the database and if a change is allowed then the change is made to the database.
Serge

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 4:10 pm
by mol
I never edit data in grid. I don't like it. I'm always building special form to enter/change data. It's more flexible to control if entered values are proper.

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 4:12 pm
by mol
I have only one problem with browse - I don't know how to update one selected row after editing it in another form.
Has anyone idea?
Browse.Refresh does it, but causes flickering of screen and take time

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 5:04 pm
by franco
I use temp indexes.....
use table
index on mainitem to temp for something name = 'A' or name = ''T'....... country = 'B' .... invoice = '12345' .... anything in the table
For grid you must keep the record size small.
I agree with Mol. .Edit in another window.
I was looking at editextended in 3.44 . It has a browse window and edit window already made.

Re: Grid syncronizing with dbf

Posted: Mon Apr 13, 2020 5:34 pm
by mlnr
Ok, i see.
I know this is the hardest way but i have to edit the data in the grid and modify every changes in the DBF as well.
Thank you guys.

Re: Grid syncronizing with dbf

Posted: Tue Apr 14, 2020 6:52 am
by serge_girard
Gabor,

The above way will give you opportunity to reject changes if not OK!

Serge

Re: Grid syncronizing with dbf

Posted: Tue Apr 14, 2020 8:26 am
by AUGE_OHR
hi,

have found a Demo to use a "virtual DBF" instead of Array for "virtual GRID"
c:\hmg.3.4.4\SAMPLES\Advanced\MEMORY_TABLES\demo.prg

have not work with it yet but it seems a interessing Way to avoid "real temporary" DBF.

---

as long you work exclusiv on DBF you can use Browse / Grid in "Edit-Mode" ... but for Network you need "locking".
when using BROWSESYNC ON it will sync navigation with DBF ... make much Traffic ...

when using SQL you don“t have "direct link" to Database ... you "just" get a Result-Set to fill a Array ... or "virtuial DBF"
also think about "write-back". using Cell-Edit is just 1 x Field so you have to lock/un-lock often ...
under SQL same will send many INSERT() Statment ... :roll:

so i do VALID when User press OK and if something wrong i setFocus to that Control and display Tooltip.
when all VALID are OK i "send" all "changed Field" new Value to Server ... for DBF just 1 x Lock / Un-lock