Help with memo field and appendchunk in table obj 
Author Message
 Help with memo field and appendchunk in table obj

Hello,

i'm trying to store (update) a memo field of my DB with the
appendchunk method on a table object. But it isn't working...
Could someone check my code and give me some tips?
Here it is the code:

    If Not (Text4.Text = Null) Then
        MyTab("memo").AppendChunk (Text4.Text)
    End If

Thanks for the help.

Best regards,


Univ.Autonoma de Lisboa - Lisboa, Portugal - European Union
Departamento de Informatica (Computer Science Dept.)



Sat, 27 Dec 1997 03:00:00 GMT  
 Help with memo field and appendchunk in table obj

Quote:

>i'm trying to store (update) a memo field of my DB with the
>appendchunk method on a table object. But it isn't working...
>Could someone check my code and give me some tips?
>Here it is the code:

>    If Not (Text4.Text = Null) Then
>        MyTab("memo").AppendChunk (Text4.Text)
>    End If

>Thanks for the help.

Try this....

MyTab.Recordset.Edit      'If not already in edit mode
If Not IsNull(Text4.Text) Then
  MyTab("memo").AppendChunk (Text4.Text)
Endif
MyTab.Recordset.Update    'If not already updating the recordset



Sun, 28 Dec 1997 03:00:00 GMT  
 Help with memo field and appendchunk in table obj

Hello A.Pedro Maia de Lima:

You require a few extra lines of code to accomplish your goal.  
Try this:
Dim Numchunks as long, RemChunk as Integer, TSize as Long, CurrSz
as Integer, I as Integer, CurrCH as String,ChunkSize as Integer
ChunkSize=2000
 If Not (Text4.Text = Null) Then
     TSize= Me!Text4.Text.FieldSize()
     NumChunks=TSize/ChunkSize  ' Number of passes needed
     RemChunk=TSize Mod ChunkSize ' What's left over
     CurrSz=ChunkSize
     For I=0 to NumChunks
          CurrCH=Me!Text4.Text.GetChunk(I*ChunkSize,CurrSz)
          MyTab("memo").AppendChunk (CurrCH)
     Next I
     If RemChunk<>0 then
     MyTab.("Memo")=MyTab.("Memo") &
Right(Me!Text4.Text,(TSize-(I*ChunkSize)))

    End If



Thu, 01 Jan 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Append memo field to a different memo field

2. Memo fields - problems reporting 2 memo fields

3. HELP: linking txt field with a memo field

4. Memo field dbase III tables maximum 5000 bytes (problem VB4)

5. 4 memo fields in 1 table?

6. Memo field dbase III tables maximum 5000 bytes (problem VB4)

7. JET: 4 Memo Fields in 1 Table?

8. Help Help Need to copy a field from one table into another table

9. Embed Fields within a memo field

10. Help - Searching Memo Fields For Multiple Strings

11. Need Help - Searching Memo Fields For Strings

12. Help! I need to Split a memo field

 

 
Powered by phpBB® Forum Software