I have two tables tbl_lang and tbl_unicode as described below:
tbl_lang
lang_id lang_name lang_code
1 Français fr
2 العربية ar
3 Deutsche ge
tbl_unicode
ent_id ent_name fr ar ge
1 lbl_username Nom d'utilisateur اسم المستخدم Benutzername
2 lbl_password mot de passe كلمه السر Passwort
While displaying in the Datagridview, i am displaying the Language Names (lang_name from tbl_lang) and when i have to run update query on any translations in the datagridview, i want to dynamically get the column name (lang_code from tbl_lang) . Something close to this:
update tbl_unicode set (select lang_code from tbl_lang where lang_name = 'Français') = "new_value" where ent_id=1
Can anyone help me on this please.