|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| Shared access on datafiles? |
| Iniciado por giavardistefano78, 09,may. 2015 17:58 - No hay respuesta |
| |
| | | |
|
| |
| Publicado el 09,mayo 2015 - 17:58 |
I try to explain the issue with directly with an example. A project contains 2 forms, master-detail, for browsing customers for example. The main form shows the whole list of customers and the user can open the detail for N customers. So an user can open via OpenChild N detail form concurrently, customer1 + customer2 + customer3 (eventually more than one instance of customer1 but only for testing purpose).
If each detail form uses a HReadSeekFirst on Customer datafile + FileToScreen to retrieve data and filling form fields it seems that the 3 instances of detail form share the access to the datafile. So if I click a debug button for showing the value of Customer.name and the forms are opened in sequence 1-2-3 when i show the value on form1 after form3 is loaded I see the name of customer3 because the last read on the file has been performed by form3.
Even if I open a detail form while the master form is still loading the big list of customers It seems that the HReadSeekFirst of detail form could be in conflict with the HReadNext of the master form.
I expected that each form has its own access/flow on the datafile but tests gave me another response. It seems that N processes launched on the same datafile from the project analysis steal each other the current cursor to the datafile. How to get rid of this? Aliases are not a solution for me because I cannot use them to link data to controls at design time. Opening several parallel connections to the database is the only choice?
I'm a novice so I hope this happens due to my inexperience on WD. Thank you |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|