Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 3 Jahren, 3 Monaten
Letzter Beitrag:
vor 3 Jahren, 3 Monaten
Beteiligte Autoren:
Allard, Yogi Yang, Alexandre Leclerc, Paulo Oliveira

WD17 - HFSQL Classic Write Data is slow

Startbeitrag von Yogi Yang am 04.03.2015 11:56

Hello All,

In have developed a small software in WD17.

In the software there is a Window in which there is a ComboBox in which Data is loaded from a Query. Besides the ComboBox there is a button. When the user clicks on the button it will show Window to add a new entry in database. Once the Window is closed there is code to re run the query and reload the contents in ComboBox.

The code is as below:

Open(WIN_CustomerMasterEntry,True,0) //If we need to add new Second Param is True and Last Param is always 0
HExecuteQuery(QRY_CustomerMaster)
ListDisplay(COMBO_JobWorkCustomer,taInit)
COMBO_JobWorkCustomer = -1


This code is working fine on my PC but when we deployed the compiled software to another PC it is not working.

After analyzing I think the problem is that the Data File in which the data is saved is not updated immediately from the Window that allows to add a new entry to the file. It seems to get buffered

Again if we restart the software in question the data that was added previously shows up properly.

So how can we force HFSQL Classic to write all the data immediately when a Window closes?

Is there any solution for this problem? Can the Pros please guide me here.

TIA

Yogi Yang

Antworten:

Hi Yogi
check the HSecurity, HFlush functions.

von Paulo Oliveira - am 04.03.2015 12:29
Hi yogi,

The tainit code forses the ititiation code of the combo. If there is nothing then nothing is done. And thus no refres of the list.

You could add a query ( internal ) query that loads the combobox. in th initiation code of the list ( combo ) you specify query prameters if you need to with

mysource.parameter = parameter.

you can use a query like you are doing now but then add it to the initiation code of the combo. Then running the combo(combo,taini) will run the query and refress the list as you would want.

regards
Allard

von Allard - am 04.03.2015 12:50
Hi Yogi,

Adding to Paulo, this is normal SMB protocol behaviour if your files are shared on a network drive. Windows will use opportunistic locking to decreas network i/o. You can read this very good article we used for years about that if you want to know more: http://www.dataaccess.com/whitepapers/opportunlockingreadcaching.html

If you want a real solution, use HyperFileSQL Client/Server even if this is on a standard workstation. You will save hours of weird code behavior and debugging. HFSQL CS is your friend. We simply do not use Classic HFSQL anymore, except if this is a stand-alone workstation. The moment there are 2 users we use HFSQL CS.

Best regards!
Alexandre Leclerc

Edit 1: Fixed URL.

von Alexandre Leclerc - am 04.03.2015 13:43
Hi

I agree with Alexandre. I use onley hf cs. You get backup etc for free as well

regards

Allard

von Allard - am 04.03.2015 18:10
Thanks everyone for your replys.

I am playing at the moment with HFlush and FSecurity.

I hope these two will save me the trouble that I am facing.

At the moment the software is build on HFSQL Classic but after 2 months planning to rewrite it from scratch and hoping to use HSSQL CS in the new version.

Regards,

Yogi Yang

von Yogi Yang - am 07.03.2015 11:57
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.