Zum Inhalt

ExecuteSQL (Opus Funktion)

Beschreibung

Diese Funktion führt ein SQL Befehl aus. Executes a non-query SQL statement (INSERT, UPDATE, DELETE) and returns the new record ID for INSERT statements.

Argumente

Name

Typ

Beschreibung

SQLStatement

string

SQL Anweisung.

Timeout

integer

(optional) Timeout in Sekunden für die Operation. Default ist 30 s.

Rückgabewert integer

Gibt bei einem INSERT die ID des (zuletzt) hinzugefügten Datensatzes zurück. the auto-generated ID of a newly inserted record, or 0 for other statements

Beispiel

Ls_Sql = "INSERT INTO SSL_TeacherPayment (" +
"s_Comment, " +
"s_Editor, " +
"i_SSE_CostUnitID) " +
"VALUES (" +
"'E-Learning Lektionen', " +
"'SMT', " +
NumToString(Li_CostUnitID) + ")";

ExecuteSQL(Ls_Sql, 100);

Siehe auch