|
| Iniciado por guest, 22,nov. 2014 08:45 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 22,noviembre 2014 - 08:45 |
Hi All
a bit of background:
data is on a remote server hfsql server 19 WD 19 a query with a list of records a form editing one of the records
need to : I need to use independant hfsql becasue the user needs to edit / create more than one record at a time
problem: when is on, the time to open a form is about double what it takes if it is off. The time in question is seconds but any extra secords gives a feel of sluggishnes and when the users need to be fast thenI have a speed problem.
I tried aliases, MDI parent / child.
Any ideas please?
as an aside this was not a problem in clarion as each screen would open its own buffers but am not sure how to accomplish the opening of several buffers pointing to the same file in windev. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 22,noviembre 2014 - 13:11 |
Hi Noel
it's quite normal, as each independent context needs to open a new connection to the DB.
2 tricks you can use, depending on your application context:
1- continue to use independent contexts, but open one window in advance each time... When you use one, you open another in the background and have it ready.
-OR-
2- Stop using independent contexts. Instead, do NOT rely on the buffer content. To do that: - pass the record ID as a parameter to the window - read the record in the init and IMMEDIATELY fill the fields with it's contents - when doing the hmodify, start by reading the record again, set the fields and save. - as the same user can not save two records of the same file at the same time, this prevent any conflicts. - of course, if you need to, you can save the content of the record in a record type variable
I have been using this technique since WAY before independent context became available, and it works quite well
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,noviembre 2014 - 08:13 |
HI Fabrice
thanks for the reply.
I am not sure about the first opton but the second one will work. I got used to filetoscreen and screentofile and forgot about unlinked fields and manuel assignment. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 23,noviembre 2014 - 16:33 |
Hi Noel,
You said: "I got used to filetoscreen and screentofile and forgot about unlinked fields and manuel assignment."
But that has NOTHING to do with my second method...
When in my form I read the desired record, I can immediately afterwards do a filetoscreen (I juts read the record from the file, why couldn't I?)... Same thing when I read the record AGAIN before saving it... ScreenTo File is absolutely usable.
The only difference in my code is that I read the record from the file when I need it's content, instead of relying on the fact that no other window used the file buffer for another record.
Everything else stays the same
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,noviembre 2014 - 12:02 |
Hi Fabrice,
you are right about the filetoscreen and screentofile. I just got a bit confuesed <img src="/NG2013_WEB/ui/smiley/1.gif" align=absmiddle border=0 alt=":)">
one question : can one clone a window prgramatically or use the same window with an alias so that I do no have to copy the same window from the IDE?
Thanks Noel |
| |
| |
| | | |
|
| | |
| |
| Publicado el 24,noviembre 2014 - 14:20 |
Hi Noel,
yes you can... OpenChild and OpenSister both have an alias management system built in. Just read the details of the help fr it
Best regards |
| |
| |
| | | |
|
| | | | |
| | |
|