Grid syncronizing with dbf
Moderator: Rathinagiri
Re: Grid syncronizing with dbf
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
Thank you Serge and Marek,
When did you save the data? After you have finished the work with grid or on the fly?
When did you save the data? After you have finished the work with grid or on the fly?
- serge_girard
- Posts: 3364
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Grid syncronizing with dbf
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
Serge
There's nothing you can do that can't be done...
Re: Grid syncronizing with dbf
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
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
Has anyone idea?
Browse.Refresh does it, but causes flickering of screen and take time
Re: Grid syncronizing with dbf
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.
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.
All The Best,
Franco
Canada
Franco
Canada
Re: Grid syncronizing with dbf
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.
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.
- serge_girard
- Posts: 3364
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Grid syncronizing with dbf
Gabor,
The above way will give you opportunity to reject changes if not OK!
Serge
The above way will give you opportunity to reject changes if not OK!
Serge
There's nothing you can do that can't be done...
- AUGE_OHR
- Posts: 2108
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Grid syncronizing with dbf
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 ...
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
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 ...
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
have fun
Jimmy
Jimmy