Results 1 to 5 of 5

Thread: How to define Stored Procedure is Finished

  1. #1

    Thread Starter
    Member Reva's Avatar
    Join Date
    Sep 2008
    Posts
    60

    Smile How to define Stored Procedure is Finished

    In a Client Server environment, i run two command that call stored procedure in sql server.

    one stored procedure generate data
    and the other one calculate the data that generated from first sp

    but how is the client know that the data in first command is finished, so the client can call the second command?


    thanx

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How to define Stored Procedure is Finished

    When the .Execute method is done...

    Unless you are firing up a background worker thread and calling the SP so you can do other processing, a call to the SP halts the calling sub until either you get a timeout error (sp took too long to complete) or the sp is done and returns back to the code.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Member Reva's Avatar
    Join Date
    Sep 2008
    Posts
    60

    Re: How to define Stored Procedure is Finished

    hi techgnome,

    thanx.

    well in the practice, the first sp isn't finished yet but in vb code i still can execute next code after the execute method and i'm not using thread.

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: How to define Stored Procedure is Finished

    What languare are you using? Only when you are executing them Asynchronously that the vb code would allow you to continue after starting the execution of a Stored Procedure, if not then it will wait until it is finished.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Member Reva's Avatar
    Join Date
    Sep 2008
    Posts
    60

    Re: How to define Stored Procedure is Finished

    that time i used VB6, but i think would be same in .NET either.

    i forget did i use it Asynchronously or not. because since that, i just doing a sequential request, and calculate in the client side and update the table and so on, for each row. that is so unefficient , and the Lan Traffic too.

    sorry for my bad english.

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