Results 1 to 2 of 2

Thread: creating session in VB6 using CDONTS

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    6

    Unhappy creating session in VB6 using CDONTS

    hai
    im doing a project.i created a CDONTS session. i want to create a session for username. when im trying to create a session using the following code

    VB Code:
    1. ses.Session("uname") = txtUName.Text

    but im getting an error

    Run-time error '-2147219963(80040605)'
    Methid 'Session' of object 'ISession' failed.

    how can i create a session?
    please help me Rob

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: creating session in VB6 using CDONTS

    here is some old code from when i was using cdo, but i don't have cdo now as this program wouldn't work in XP using this method

    VB Code:
    1. Dim MySession As Session
    2. Dim Mymsg As Message
    3. Dim Mymessagecol As Messages
    4. Dim Myrecipscol As Recipients
    5. Dim Myrecip As Recipient
    6. Dim Myattcol As Attachments
    7. Dim Myatt As Attachment
    8. Dim a, b, c, d, e, x
    9. On Error GoTo error4xx
    10. Set MySession = New Session
    11. On Error Resume Next
    12. MySession.Logon profile, , True, True
    13.  
    14. Set Mymessagecol = MySession.Outbox.Messages
    15. Set Mymsg = Mymessagecol.Add
    16. Set Myrecipscol = Mymsg.Recipients
    17. Set Myrecip = Myrecipscol.Add
    18. Set Myattcol = Mymsg.Attachments
    19. Set Myatt = Myattcol.Add

    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width