Link to home
Start Free TrialLog in
Avatar of cegg1
cegg1

asked on

GetChunk/Memo problem

Hi,

I'm having trouble extracting data from an Access Memo field using a Microsoft Remote Data Control. I'm using VB6. All the examples show something like:

Dim Buffer() As Byte
Buffer() = Rs!Myfield.GetChunk(dataSize)

For me this raises the error 'invalid use of null' since this is what Rs!Myfield.GetChunk(dataSize) is always returning.

Testing using a short memo both Rs!Myfield.ColumnSize and Rs!Myfield.Value are correct in the watch window - Rs!Myfield.ChuckRequired = true. (Aside: assigning Rs!Myfield.Value directly to a string raises the error 07001 'incorrect number of parameters')

What am I doing wrong?

Cheers
Avatar of cegg1
cegg1

ASKER

[This same question is posted to the Computers section in error - so 50 more points there for the answer]
Dim cnkChunk() As Byte
Dim lngChunkLength As Long

Private Sub Command1_Click()
    lngChunkLength = 100
    cnkChunk = MSRDC1.Resultset!Memo.GetChunk(lngChunkLength)
    Text1.Text = cnkChunk
End Sub

I have used the above code to do this task and it seems to work ok, with a remote data control,textbox and command button on the form.
Avatar of cegg1

ASKER

Thanks for the reply Tim. Unfortunately this doesn't work for me. Any ideas why? (It's sticking on this GetChunk() returning null part)
ASKER CERTIFIED SOLUTION
Avatar of ventond
ventond
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial