summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2014-08-31 15:44:08 +0200
committerJean-Pierre Ledure <jp@ledure.be>2014-08-31 08:48:12 -0500
commit35c970839e1372e454e9e4357908f965f7853329 (patch)
tree60409b00a730524c92b3e2473906c00f496b2cfb
parent539f5b5f7dfc1168c4a6b826bfb18362c80fb424 (diff)
Access2Base - PATCH-01 Field.setValue
Gives erroneously an error message when argument is Null and field is nullable https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=61447&sid=48e231a12084933d9da1b47e50b186ea#p323714 Change-Id: Icdfd660dfa52ea7434959f0d87ac2d989c1910ab Reviewed-on: https://gerrit.libreoffice.org/11216 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jean-Pierre Ledure <jp@ledure.be>
-rw-r--r--wizards/source/access2base/Field.xba10
1 files changed, 8 insertions, 2 deletions
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index 39fbfeca3306..afd0e4033562 100644
--- a/wizards/source/access2base/Field.xba
+++ b/wizards/source/access2base/Field.xba
@@ -485,7 +485,13 @@ Dim oParent As Object
If Application._CurrentDb().Recordsets(_ParentName)._EditMode = dbEditNone Then Goto Trace_Error_Update
With com.sun.star.sdbc.DataType
If IsNull(pvValue) Then
- If Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE Then Column.updateNull() Else Goto Trace_Null
+REM If Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE Then Column.updateNull() Else Goto Trace_Null
+ If Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE Then
+ Column.updateNull()
+ Goto Exit_Function
+ Else
+ Goto Trace_Null
+ End If
End If
Select Case Column.Type
Case .BIT, .BOOLEAN
@@ -740,4 +746,4 @@ Property Set Value(ByVal pvValue As Variant)
Call _PropertySet(&quot;Value&quot;, pvValue)
End Property &apos; Value (set)
-</script:module> \ No newline at end of file
+</script:module>