Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 4 Jahren, 8 Monaten
Beteiligte Autoren:
Piet van Zanten

[WB(WX?)18] Variant initialization changed

Startbeitrag von Piet van Zanten am 22.11.2013 10:45


Just a heads up to check your use of variants.
A few weeks ago I noticed that some queries that were always working fine failed to execute.
Afre some investigation I found out why.
It seems that at some point in time (automatic update?) the initialization of variant type variables has changed.
Until a few weeks ago a variant was initialized to an empty string "" after declaration, but now it's initialized to Null.
That seems more appropriate than "" and I can live with that, but in some queries I now get an execution error.
I had this code to fill a list of values for a query parameter:
FOR EACH qry_SoAndSo
vParam=vParam[[2 to]] //to remove preceding komma.
This used to result in e.g. 2,3,4 but since vParam is now initialized to Null it now results ,2,3,4 (Null occupies one extra space in front of the vParam, "" does not)
The query that uses this parameter now fails to execute because of the preceding komma.
I had to check all occurences of variants and make some minor code changes.
However, a minor change like this can have mega effects on your live application if some queries suddenly don't work anymore.
A great risk for us as software developpers if we don't get info about such changes.



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.