summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/source/access2base/Field.xba17
1 files changed, 10 insertions, 7 deletions
diff --git a/wizards/source/access2base/Field.xba b/wizards/source/access2base/Field.xba
index 7bff09d3e969..5b94ba2f8bee 100644
--- a/wizards/source/access2base/Field.xba
+++ b/wizards/source/access2base/Field.xba
@@ -189,6 +189,7 @@ Const cstThisSub = "Field.GetChunk"
Utils._SetCalledSub(cstThisSub)
Dim oValue As Object, bNullable As Boolean, bNull As Boolean, vValue() As Variant
+Dim lLength As Long, lOffset As Long, lValue As Long
If IsMissing(pvOffset) Or IsMissing(pvBytes) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvOffset, 1, _AddNumeric()) Then Goto Exit_Function
@@ -205,6 +206,7 @@ Dim oValue As Object, bNullable As Boolean, bNull As Boolean, vValue() As Varian
bNullable = ( Column.IsNullable = com.sun.star.sdbc.ColumnValue.NULLABLE )
bNull = False
GetChunk = Null
+ vValue = Array()
With com.sun.star.sdbc.DataType
Select Case Column.Type ' DOES NOT WORK FOR CHARACTER TYPES
' Case .CHAR, .VARCHAR, .LONGVARCHAR
@@ -218,14 +220,15 @@ Dim oValue As Object, bNullable As Boolean, bNull As Boolean, vValue() As Varian
Case Else
Goto Trace_Error
End Select
+ If bNullable Then bNull = Column.wasNull()
+ If Not bNull Then
+ lOffset = CLng(pvOffset)
+ If lOffset > 0 Then oValue.skipBytes(lOffset)
+ lValue = oValue.readBytes(vValue, pvBytes)
+ End If
+ oValue.closeInput()
End With
- If bNullable Then bNull = Column.wasNull()
- If Not bNull Then
- If pvOffset > 0 Then oValue.skipBytes(pvOffset)
- oValue.readBytes(vValue, pvBytes)
- GetChunk = vValue
- End If
- oValue.closeInput()
+ GetChunk = vValue
Exit_Function:
Utils._ResetCalledSub(cstThisSub)