Results 1 to 3 of 3

Thread: VB constructor problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Posts
    1

    VB constructor problem

    Hi.

    I wrote a C++ server which loads a driver for a specific hardware device and loads some binary files to that device. This operation takes a few seconds(~10 seconds).
    I also have a VB client which activates this server and actually initaiates this whole process in the server.

    my code in VB is : Set pLock = New PXServerLib.Lock .

    Problem: the VB client returns a 'runtime error 429' while server is still loading those files to the device.

    Question: Is there a timeout for the constructor(Set) in VB? if yes , how can I control the timeout?

    Thanks
    Don

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Try incrementing the OLE serve timeout by having this in your VB application startus:

    VB Code:
    1. App.OleServerBusyTimeout = 30000
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Location
    OZ
    Posts
    19
    you may try to break the process when encounter run time error:

    VB Code:
    1. Private Sub xxx()
    2. on error goto errhandler:
    3.    Set pLock = New PXServerLib.Lock
    4.    ... your code
    5.    Exit Sub
    6.  
    7. errhandler:
    8. set pLock = nothing
    9. msgbox err & vbcrlf & error(err)
    10. End sub

    Wish it helps
    ******************************
    I finally can go to bed at 7:55am
    but I need to work at 8:00am
    ******************************

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