You have several problems in your program:
- the TextTransArray variables are NOT initialized in the Designer routine because LANGUAGECODE=""
- if you set LANGUAGECODE="101" you get the header names
- unfortunately if you set LANGUAGECODE="102" , the variable TextTransArray(8)="" because in your database there is no string in, so you get the same error.
- you can't call UpdateLanguage at the beginning because the different objects are not yet defined.
- in lines 45-47 you should replace the text by the variables
replace AddLabel("LOGINFORM","usernamelabel",10,30,90,20,"Username")
by AddLabel("LOGINFORM","usernamelabel",10,30,90,20,TextTransArray(0))
Once you have set the Table header texts you cannot change them afterwards. The only way is to dispose the table and initialize it again.
Why do you add all controls at runtime and not in the form designer. You don't see the layout and you are loosing the very interesting Autocomplete feature. In that case you could call UpdateLanguage at the beginning.
Best regards.