Memo field not returning more than 256 characters.
-
with the following call
vtFld = m_pRecordset->Fields->GetItem(lpFieldName)->Value;
where lpFieldName is type "memo", I am only getting the first 256 character returned to the variant variable vtFld. I am using MS Access as my database editor which in turn uses JET as the database. Might anyone know why I'm am only getting the first 256 characters returned? I checked all of the fields in vtFld and all the relavent ones contain the returned truncated string. Thanks! -
with the following call
vtFld = m_pRecordset->Fields->GetItem(lpFieldName)->Value;
where lpFieldName is type "memo", I am only getting the first 256 character returned to the variant variable vtFld. I am using MS Access as my database editor which in turn uses JET as the database. Might anyone know why I'm am only getting the first 256 characters returned? I checked all of the fields in vtFld and all the relavent ones contain the returned truncated string. Thanks!Do you use ODBC recordsets? I recently run into the same problem when working with DTL (uses ODBC under the hood), and found the solution here[^]
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
Do you use ODBC recordsets? I recently run into the same problem when working with DTL (uses ODBC under the hood), and found the solution here[^]
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
with the following call
vtFld = m_pRecordset->Fields->GetItem(lpFieldName)->Value;
where lpFieldName is type "memo", I am only getting the first 256 character returned to the variant variable vtFld. I am using MS Access as my database editor which in turn uses JET as the database. Might anyone know why I'm am only getting the first 256 characters returned? I checked all of the fields in vtFld and all the relavent ones contain the returned truncated string. Thanks! -
Did you use aggregate functions (SUM, AVG, MAX, COUNT, etc) in your sql statement? Also a memo field will be truncated to 255 characters in a query that uses sorting (ORDER BY).
Well, I guess there are a couple things I am noticing. To answer the questions above, no, I am not using any aggregate functions and there isn't an ORDER BY in the statement. However, I have other memo fields in other tables which return more than 256 fields when called through ADO, which makes we wonder about the table itself. Does anyone know what might cause a single table to cause these issues? One thing that is different in this table is that there are relationships mapped to it. thanks! :)
-
Well, I guess there are a couple things I am noticing. To answer the questions above, no, I am not using any aggregate functions and there isn't an ORDER BY in the statement. However, I have other memo fields in other tables which return more than 256 fields when called through ADO, which makes we wonder about the table itself. Does anyone know what might cause a single table to cause these issues? One thing that is different in this table is that there are relationships mapped to it. thanks! :)
Well, some people also suggested that there's a bug when calling memo fields. They recommend either getting a column for every 256 chars (using MID) :wtf: Others recommend calling the GetChunk() function. It takes a long as argument, so you should be able to get everything using it. Here's a sample of the function called in ASP:
set rst = conn.execute("select job_title, job_descr from jobs")
strTitle = rst.Fields("job_title").value & ""
vChunk = rst.Fields("job_descr").GetChunk(4000)
strDescr = vChunk
Do Until IsNull(vChunk) = true
vChunk = rst.Fields("job_descr").GetChunk(4000)
vDescr = vDescr & vChunk
LoopHope it helps! :-D