Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
2.1 kB
22
Indexable
Never
{ Startet Sprachumschaltung
 mögliche Sprachen: deutsch, hollaendisch
}

DIM oldscriptname AS MESSAGE;                                                                          

oldscriptname = sys_Scriptname_m;                                                                          
sys_Scriptname_m = oldscriptname + "->QF Sprachwahl";                                                       
sys_Sperre_Fehlerfunktion_d = 0;                                                             
                     
sys_Fehlerort_i = 0; 

sys_Sprache_m = Sprache;

RecipeLoad( sys_Pfad_Sprachumschaltung_m, "Variable", Sprache);


{Lade AlarmComments aus der Datenbank:}

DIM NumRows AS INTEGER;
DIM zaehler AS INTEGER;
DIM TableName AS MESSAGE;
DIM BindList AS MESSAGE;
DIM WhereExpr AS MESSAGE;
DIM OrderByExpr AS MESSAGE;
DIM merker AS INTEGER;

{Selectanweisung}
sys_Fehlerort_i = 1;
TableName = "mar_Alarm_Comment";
BindList = "AlarmComments";
WhereExpr = "";
OrderByExpr = "";
sys_SQL_returncode_i  = SQLSelect( sys_SQLConnectionId_i , TableName, BindList, WhereExpr, OrderByExpr );

{Zurückgegebene Zeilen ermittlen}
sys_Fehlerort_i = 2;
NumRows = SQLNumRows( sys_SQLConnectionId_i  );

{Ermittle die Werte aller Zeilen}
sys_Fehlerort_i = 3;
FOR Zaehler = 1 TO Numrows 
    sys_SQL_returncode_i  = SQLNext(sys_SQLConnectionId_i );
    sys_AlarmComment_Load_d.Name = StringTrim( sql_Alarm_Name_m, 3);
    IF Sprache == "deutsch" THEN
        sys_AlarmComment_Load_d.AlarmComment = StringTrim( sql_Alarm_deut_m, 3);
    ELSE
        sys_AlarmComment_Load_d.AlarmComment = StringTrim( sql_Alarm_holl_m, 3);
    ENDIF;
NEXT;
sys_SQL_returncode_i  = SQLEnd(sys_SQLConnectionId_i );

sys_Scriptname_m = oldscriptname  ;                                                                         { aufrufenden Scriptnamen restore}

IF Sprache == "deutsch" THEN
    sys_Bild_unten_m = "De" + StringRight(sys_Bild_unten_m, 2 );
ELSE
    sys_Bild_unten_m = "Holl" + StringRight(sys_Bild_unten_m, 2 );
ENDIF;
Leave a Comment