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
cegg1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cegg1Author Commented:
[This same question is posted to the Computers section in error - so 50 more points there for the answer]
0
TimCotteeHead of Software ServicesCommented:
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.
0
cegg1Author Commented:
Thanks for the reply Tim. Unfortunately this doesn't work for me. Any ideas why? (It's sticking on this GetChunk() returning null part)
0
ventondCommented:
Here is what I use. My code uses a DAO control, but it should be the same
           
Dim String1 As String
String1 = Data1.Recordset("FileImage").GetChunk(Offset, 64000)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.