wizards/source/access2base/Database.xba | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 71a646895d34e6ff273eb1ca0a7e99bd3b1e1163 Author: Jean-Pierre Ledure <[email protected]> Date: Sat Mar 11 15:24:31 2017 +0100 Access2Base - RunSql: execute i.o. executeUpdate execute on Statement seems safer for some DDL statements Additionally error handling was initiated, not terminated. Change-Id: Ic2e987a84e87c01048b65f74efc938163ca17f2c diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index 4d7513e..20129c1 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -898,7 +898,8 @@ Public Function RunSQL(Optional ByVal pvSQL As Variant _ If _ErrorHandler() Then On Local Error Goto Error_Function - Utils._SetCalledSub("RunSQL") +Const cstThisSub = "Database.RunSQL" + Utils._SetCalledSub(cstThisSub) RunSQL = False If IsMissing(pvSQL) Then Call _TraceArguments() @@ -914,14 +915,15 @@ Dim oStatement As Object, vResult As Variant Set oStatement = Connection.createStatement() oStatement.EscapeProcessing = Not ( pvOption = dbSQLPassThrough ) On Local Error Goto SQL_Error - vResult = oStatement.executeUpdate(_ReplaceSquareBrackets(pvSQL)) + vResult = oStatement.execute(_ReplaceSquareBrackets(pvSQL)) On Local Error Goto Error_Function RunSQL = True Exit_Function: + Utils._ResetCalledSub(cstThisSub) Exit Function Error_Function: - TraceError(TRACEABORT, Err, "RunSQL", Erl) + TraceError(TRACEABORT, Err, cstThisSub, Erl) GoTo Exit_Function SQL_Error: TraceError(TRACEFATAL, ERRSQLSTATEMENT, Utils._CalledSub(), 0, , pvSQL) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
