How to populate memo field using SQL 
Author Message
 How to populate memo field using SQL

In Access97, I want to insert a record into a table that
has a memo field.  I am using a querydef that successfully
inserts records into the table most of the time.  However,
if the value for the memo field is longer than 255
characters, I get an error.  The VBA statement that
assigns the value to the appropriate query parameter
raises an error.

e.g., if table Tbl has a memo field fldA,

set qd = currentdb.createquerydef("")
qd.sql = "PARAMETERS [longpm] LongText, [shortpm] Text;
INSERT INTO Tbl (fldA, fldB) VALUES ([longpm],[shortpm])"
qd.Parameters![longone] = tempstr$

The last line raises an error if the variable tempstr$
contains a string longer than 255 chars.  How can I
populate a memo field using DAO?



Mon, 26 Sep 2005 05:32:46 GMT  
 How to populate memo field using SQL


Quote:
> The last line raises an error if the variable tempstr$
> contains a string longer than 255 chars.  How can I
> populate a memo field using DAO?

Check the AppendChunk and GetChunk methods.

Tim F



Tue, 27 Sep 2005 02:08:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Populating memo field using update query from VB5

2. Updating data to a memo field using SQL UPDATE

3. Insert Text into a memo field using SQL

4. Populating FoxPro memo fields

5. Append memo field to a different memo field

6. Memo fields - problems reporting 2 memo fields

7. DataSet, Memo Fields, and SQL

8. ODBCDirect Problem with SQL Server Memo/Picture Fields

9. Text/Memo Fields in SQL 6.5

10. SQL Queries and Memo fields?

11. Putting Text with Apostrophe into SQL Server Memo Field

12. SQL Searching For Text in Memo Fields with Binary Data Included

 

 
Powered by phpBB® Forum Software