Variable assignment/Strings

Hello,

I have just come across something weird. This is the code

...
sqlHeader = 'INSERT INTO ' + tabelle + ' (';
sqlHeader += fieldArray.join(', ');
sqlHeader += ') VALUES (';

... // inside a loop
	sql += sqlHeader + dataArray.join(', ') + ')' + '\n';
...

When I do sql += inside the loop, the variable sqlHeader changes to the contents of the variable sql?! When instead I do

sql += sqlHeader 
sql += dataArray.join(', ') + ')' + '\n';

it works as expected.

Am I doing something wrong here?

Thanks
Patrick

This is fixed in Servoy 2.2rc5