String Gets Truncated when reading it back

  • Thread starter Thread starter jalil.feghhi
  • Start date Start date
J

jalil.feghhi

I have an access database that has a field (type memo) that keeps very
long strings. When the value of this field is very long, my Visual
Basic 6.0 code does not return the whole value and truncates it. I
just read it using standard code like this:

storeId = rstMsg!storeId

where is defined as: Dim stMsg As ADOdb.Recordset

Everything works fine if storeid is not very big.

Does anybody know why this happens?

Thanks,

-Jalil
 
I have an access database that has a field (type memo) that keeps very
long strings. When the value of this field is very long, my Visual
Basic 6.0 code does not return the whole value and truncates it. I
just read it using standard code like this:

storeId = rstMsg!storeId

where is defined as: Dim stMsg As ADOdb.Recordset

Everything works fine if storeid is not very big.

Does anybody know why this happens?

Thanks,

-Jalil

If the Query upon which the recordset is based attempts to sort by
StoreID, the field will be truncated to 255 bytes. Just don't specify
a sort, or else use a calculated field Left([storeID], 255) for
sorting.
 
wow.. good stuff.

Or, move to SQL Server and use ADP if you don't want crappy limits on
your sorting





I have an access database that has a field (type memo) that keeps very
long strings. When the value of this field is very long, my Visual
Basic 6.0 code does not return the whole value and truncates it. I
just read it using standard code like this:
storeId = rstMsg!storeId
where is defined as: Dim  stMsg As ADOdb.Recordset
Everything works fine if storeid is not very big.
Does anybody know why this happens?

-Jalil

If the Query upon which the recordset is based attempts to sort by
StoreID, the field will be truncated to 255 bytes. Just don't specify
a sort, or else use a calculated field Left([storeID], 255) for
sorting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top