diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2021-04-26 14:31:58 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2021-04-26 18:33:50 +0200 |
commit | 9976bed064cfab2b832469a42e9ca2963e200c57 (patch) | |
tree | f880d53fec571a54bad3fd89edd6d230b40321b1 /wizards | |
parent | d9341748401969b01fa89f66ade174fddb3fe6bd (diff) |
ScriptForge - (SFDatabases/SFDocuments) CommandType must be a Long
cfr. https://gerrit.libreoffice.org/c/core/+/114659
Change-Id: I1638ee3f523e685b324201cc9916a743db0ecb7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114662
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/sfdatabases/SF_Database.xba | 1 | ||||
-rw-r--r-- | wizards/source/sfdocuments/SF_Form.xba | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/wizards/source/sfdatabases/SF_Database.xba b/wizards/source/sfdatabases/SF_Database.xba index 47f86935cff4..bcbaba82d8f5 100644 --- a/wizards/source/sfdatabases/SF_Database.xba +++ b/wizards/source/sfdatabases/SF_Database.xba @@ -433,7 +433,6 @@ Public Function RunSql(Optional ByVal SQLCommand As Variant _ Dim bResult As Boolean ' Return value Dim oStatement As Object ' com.sun.star.sdbc.XStatement -Dim iCommandType ' 1 = Table, 2 = Query, 3 = SQL Dim oQuery As Object ' com.sun.star.ucb.XContent Dim sSql As String ' SQL statement Dim bDirect ' Alias of DirectSQL diff --git a/wizards/source/sfdocuments/SF_Form.xba b/wizards/source/sfdocuments/SF_Form.xba index 0af834aea4d6..c563bb302a57 100644 --- a/wizards/source/sfdocuments/SF_Form.xba +++ b/wizards/source/sfdocuments/SF_Form.xba @@ -1400,7 +1400,7 @@ Private Function _PropertySet(Optional ByVal psProperty As String _ Dim bSet As Boolean ' Return value Dim oDatabase As Object ' Database class instance -Dim iCommandType As Integer ' Record source type: 0 = Table, 1 = Query, 2 = SELECT +Dim lCommandType As Long ' Record source type: 0 = Table, 1 = Query, 2 = SELECT Dim sCommand As String ' Record source Static oSession As Object ' Alias of SF_Session Dim cstThisSub As String @@ -1488,16 +1488,16 @@ Const cstSubArgs = "Value" With oDatabase If ScriptForge.SF_Array.Contains(.Tables, pvValue, CaseSensitive := True) Then sCommand = pvValue - iCommandType = com.sun.star.sdb.CommandType.TABLE + lCommandType = com.sun.star.sdb.CommandType.TABLE ElseIf ScriptForge.SF_Array.Contains(.Queries, pvValue, CaseSensitive := True) Then sCommand = pvValue - iCommandType = com.sun.star.sdb.CommandType.QUERY + lCommandType = com.sun.star.sdb.CommandType.QUERY ElseIf ScriptForge.SF_String.StartsWith(pvValue, "SELECT", CaseSensitive := False) Then sCommand = .ReplaceSquareBrackets(pvValue) - iCommandType = com.sun.star.sdb.CommandType.COMMAND + lCommandType = com.sun.star.sdb.CommandType.COMMAND End If _Form.Command = sCommand - _Form.CommandType = iCommandType + _Form.CommandType = lCommandType End With End If End If |