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(dataSi ze)
For me this raises the error 'invalid use of null' since this is what Rs!Myfield.GetChunk(dataSi ze) 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
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(dataSi
For me this raises the error 'invalid use of null' since this is what Rs!Myfield.GetChunk(dataSi
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
Dim cnkChunk() As Byte
Dim lngChunkLength As Long
Private Sub Command1_Click()
lngChunkLength = 100
cnkChunk = MSRDC1.Resultset!Memo.GetC hunk(lngCh unkLength)
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.
Dim lngChunkLength As Long
Private Sub Command1_Click()
lngChunkLength = 100
cnkChunk = MSRDC1.Resultset!Memo.GetC
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER