summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2017-03-11 15:24:31 +0100
committerJean-Pierre Ledure <jp@ledure.be>2017-03-11 15:24:31 +0100
commit71a646895d34e6ff273eb1ca0a7e99bd3b1e1163 (patch)
tree9f023bab4cee27e468e5cd33722e451440c60b76 /wizards
parent0aa12db1c7ddcf87fef26b1467d8e4c5f5786531 (diff)
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
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/access2base/Database.xba8
1 files changed, 5 insertions, 3 deletions
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba
index 4d7513e8ad93..20129c17357d 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(&quot;RunSQL&quot;)
+Const cstThisSub = &quot;Database.RunSQL&quot;
+ 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, &quot;RunSQL&quot;, Erl)
+ TraceError(TRACEABORT, Err, cstThisSub, Erl)
GoTo Exit_Function
SQL_Error:
TraceError(TRACEFATAL, ERRSQLSTATEMENT, Utils._CalledSub(), 0, , pvSQL)