Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADO Getchunk

0 views
Skip to first unread message

Justin

unread,
Feb 6, 2002, 8:11:50 PM2/6/02
to
I'm trying to retreive the contents of a memo field (in an
access database) from a VB app. for some reason, the
ActualSize method, which I am using with GetChunk, says
the field size is 0... There is at least 1200 bytes or
more of data in the memo field of every rcord in the
recordset. ??? just using rst.fields.item("name of
field").Value returns NULL. Not sure why the ActualSize
method can't determine the correct length of the field -
any help would be appreciated. Here's the code I'm using
(simplified)

'Open the recordset
Dim conn As ADODB.Connection
Dim sconnString As String
Dim strSQL As String

strSQL = (my SQL string)
Set conn = New ADODB.Connection
sconnString = "Provider=MSDASQL; DSN=APSDefault"
conn.Open sconnString

Set rst = New ADODB.Recordset
rst.Open strSQL, conn, 2, 2, 1
Set rst = cmd.Execute

'And here's what I'm using to get the vaue.
' fFld is a variable of type Field and is set to the field
I am trying to read.

fsize = fFld.ActualSize
fFld.GetChunk(fsize)

fFld.Type is 201 (BLOB/Memo) so I know it's the correct
field...
fsize always equals 0, no matter how much data is in the
field....

Thanks in advance for any help.

Justin

unread,
Feb 6, 2002, 8:56:23 PM2/6/02
to
lol nevermind on that one. I was opening the recordset
twice with two different methods and didn't realize it =)

Justin

>.
>

Alden Raymundo

unread,
Feb 11, 2002, 4:32:37 PM2/11/02
to
Justin,

This may be a limitation of the provider. As per Help:

"Some providers may allow this property to be set to reserve space for BLOB
data, in which case the default value is 0"

Instead of a DSN, try connecting using the OLEDB provider (if possible) and
see if you get the same results. BTW, what datasource are you hitting?
I'd like to test this out myself.

Alden Raymundo
Microsoft Access Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.

0 new messages