Results 1 to 6 of 6

Thread: [2005] Trouble receiving data with old component!

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    8

    [2005] Trouble receiving data with old component!

    Hi,

    I've been programming on and off for years with Vb6. I made a program once using Dart's PowerTCP tool. The tool comes with SecureTcp which allows both secure and normal tcp connections and works very similar to Mswinsck.ocx. The componet works perfectly in VB6 however I'm trying to make it work with VB 2005. I understand there are newer versions of the control designed specifically for .NET but they cost $500 bucks.

    I started a project in Vb6 and used the Project Upgrade Wizard to update it to Vb 2005. This is where the trouble began...

    In VB6 in order to receive incoming data this code was placed in the Receive event:

    Dim sGone As String

    sslGET.Receive sGone$
    sRECV$ = sRECV$ & sGone$


    However in VB 2005 this code does not work. I used Ethereal packet analyzer to make sure the program was connecting and making the request to the server. My request was indeed going through and data was even sent back. For some reason though I can't get the data from using sslGet.Receive.

    I'm a total noob when it comes to vb 2005. I just migrated last week so this whole object oriented thing is new to me. Any help would be greatly appreciated.

    Thanks in advance

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    8

    Re: [2005] Trouble receiving data with old component!

    bump

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Trouble receiving data with old component!

    What is the signature of the Receive method? What happens when you call Receive?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    8

    Resolved Re: [2005] Trouble receiving data with old component!

    Receive (ByRef data as Object) as integer

    I call it like this


    Private Sub sslGET_ReceiveEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles sslGET.ReceiveEvent

    sslGET.Receive(sGone$)
    txtData.text = txtData.text & sGone$

    End Sub

    When I run the code txtData stays blank. I have placed a message box in the ReceiveEvent just to see if the event ever even fires. I noticed that the the message box will only show up if I place it before I call .receive(sgone$)

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Trouble receiving data with old component!

    So you're saying that if you place a MessageBox.Show after the call to Receive that it's not executed? That would suggest that Receive is never returning? Does your app freeze at this point? Are you using multi-threading?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    8

    Re: [2005] Trouble receiving data with old component!

    I am not multi threading and my program doesn't freeze. I am able to click other buttons and the code in those other buttons will execute just fine. I have no clue what's going on...

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