summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/source/access2base/Field.xba13
1 files changed, 10 insertions, 3 deletions
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index 651ae6ec64b6..b52938641710 100644
--- a/wizards/source/access2base/Field.xba
+++ b/wizards/source/access2base/Field.xba
@@ -545,12 +545,19 @@ Const cstMaxBinlength = 2 * 65535
If Utils._hasUNOProperty(Column, "Scale") Then
If Column.Scale > 0 Then
vValue = Column.getDouble()
- Else ' CLng checks local decimal point, getString does not !
+ Else ' Try Long otherwise Double (CDec not implemented anymore in LO ?!?)
+ On Local Error Resume Next ' Avoid overflow error
+ ' CLng checks local decimal point, getString does not !
sValue = Join(Split(Column.getString(), "."), Utils._DecimalPoint())
- vValue = CLng(sValue) ' CDec disappeared from LO ?!?
+ vValue = CLng(sValue)
+ If Err <> 0 Then
+ vValue = CDbl(sValue)
+ Err.Clear
+ On Local Error Goto Error_Function
+ End If
End If
Else
- vValue = CDec(Column.getString())
+ vValue = CDbl(Column.getString())
End If
Case .CHAR : vValue = Column.getString()
Case .VARCHAR : vValue = Column.getString() ' vbString