CDO Update method errors 
Author Message
 CDO Update method errors

The following code snippet is from a server-side script (on Exchange 5.5)
that I am using to convert mail arriving in a public folder to a specific
form.  I can convert the message okay but if I try to access fields that are
defined on the new form I get errors stating that the fields cannot be
found.

The solution I thought was to call the update method using the syntax
"update(True,True)" to force the session's object cache to be refreshed
after the message is converted.  Calling update with two parameters,
however, causes a scripting error.   Calling update with only the first
parameter works.  The two parameter syntax is documented in the CDO help
file.

If oItem.Type <> "IPM.Post.Test" Then
    oItem.Type = "IPM.Post.Test"
    oItem.Unread = TRUE
    oItem.Update(True,True)
    oItem.Fields("NewField") = 1
    oItem.Update
  End If

Has anyone else discovered this same problem or know of a solution?

--
Kirby Dunstan
Telesat Canada



Sun, 15 Apr 2001 03:00:00 GMT  
 CDO Update method errors
I have found that if you create a message as a specific custom form from
a server-side script, user-defined fields are unavailable to the script. One
way around this is to have the messages sent using the specified form to
begin with. If you do it this way, the fields are available.

Quote:

>The following code snippet is from a server-side script (on Exchange 5.5)
>that I am using to convert mail arriving in a public folder to a specific
>form.  I can convert the message okay but if I try to access fields that
are
>defined on the new form I get errors stating that the fields cannot be
>found.

>The solution I thought was to call the update method using the syntax
>"update(True,True)" to force the session's object cache to be refreshed
>after the message is converted.  Calling update with two parameters,
>however, causes a scripting error.   Calling update with only the first
>parameter works.  The two parameter syntax is documented in the CDO help
>file.

>If oItem.Type <> "IPM.Post.Test" Then
>    oItem.Type = "IPM.Post.Test"
>    oItem.Unread = TRUE
>    oItem.Update(True,True)
>    oItem.Fields("NewField") = 1
>    oItem.Update
>  End If

>Has anyone else discovered this same problem or know of a solution?

>--
>Kirby Dunstan
>Telesat Canada




Tue, 17 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CDO update method works W2K but not in NT4

2. VB4 and DAO 3.6 Update method Compile Error

3. Error 405(Method not allowed) error in using webclient.uploadfile method

4. Update method error

5. Application-defined error 3315 during table.Update method

6. Update method causes untrappable error.

7. Database error during update-method: 3426

8. ClientBatch with Update method, error 40041

9. Application-defined error 3315 during table.Update method

10. Update Method Error

11. Update method and Requery method

12. Updating Links in Word 2002, Edit, Links, Select Update Method

 

 
Powered by phpBB® Forum Software