summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2016-03-27 16:42:05 +0200
committerJean-Pierre Ledure <jp@ledure.be>2016-03-27 16:42:05 +0200
commitc85a438f412f32a94f8e872ed7b419b9f7667d6e (patch)
tree8be892bb0758d9cb7f5c9e79d190b231af715d4e /wizards
parentefea43b4c4f42023a540079866b065068ae8a8e5 (diff)
Access2Base - GetChunk - tests of BLOB field type
Change-Id: I02f51ff264c64458c99c47ea48d960a50c65cb75
Diffstat (limited to 'wizards')
-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 = &quot;Field.GetChunk&quot;
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 &apos; DOES NOT WORK FOR CHARACTER TYPES
&apos; 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 &gt; 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 &gt; 0 Then oValue.skipBytes(pvOffset)
- oValue.readBytes(vValue, pvBytes)
- GetChunk = vValue
- End If
- oValue.closeInput()
+ GetChunk = vValue
Exit_Function:
Utils._ResetCalledSub(cstThisSub)