how to wait for object with single threaded application

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF1bA==?=, Nov 10, 2004.

  1. Hi just wondering if there is a way to set up a wait for object in vb.net as
    if a put a delay in between the fill and the databind things work ok, but if
    not the page is reloading without the updated information,(stored procedure
    is taking too long to complete).

    the time needed for this delay will change depending on the time the "stored
    procedure" which will vary, takes to excecute.

    dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    (delay -for loop)
    datagrid.DataBind() 'bind the data grid.
    This is related to a previous post, that did not include enough information.
    thanks.

    --
    Paul G
    Software engineer.
    =?Utf-8?B?UGF1bA==?=, Nov 10, 2004
    #1
    1. Advertising

  2. ok thanks for the information. Does seem like it would wait for the
    procedure to finish, will have to figure out why the delay seems to be making
    things work, the delay is between the fill and the datagrid bind.


    "John Saunders" wrote:

    > "Paul" <> wrote in message
    > news:...
    > > Hi just wondering if there is a way to set up a wait for object in vb.net
    > > as
    > > if a put a delay in between the fill and the databind things work ok, but
    > > if
    > > not the page is reloading without the updated information,(stored
    > > procedure
    > > is taking too long to complete).
    > >
    > > the time needed for this delay will change depending on the time the
    > > "stored
    > > procedure" which will vary, takes to excecute.
    > >
    > > dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    > > (delay -for loop)
    > > datagrid.DataBind() 'bind the data grid.

    >
    > Paul,
    >
    > DataAdapter.Fill is synchronous. When it returns, the data have all been
    > loaded. If a delay is helping things at all, it's for a different reason.
    >
    > John Saunders
    >
    >
    >
    =?Utf-8?B?UGF1bA==?=, Nov 10, 2004
    #2
    1. Advertising

  3. "Paul" <> wrote in message
    news:...
    > Hi just wondering if there is a way to set up a wait for object in vb.net
    > as
    > if a put a delay in between the fill and the databind things work ok, but
    > if
    > not the page is reloading without the updated information,(stored
    > procedure
    > is taking too long to complete).
    >
    > the time needed for this delay will change depending on the time the
    > "stored
    > procedure" which will vary, takes to excecute.
    >
    > dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    > (delay -for loop)
    > datagrid.DataBind() 'bind the data grid.


    Paul,

    DataAdapter.Fill is synchronous. When it returns, the data have all been
    loaded. If a delay is helping things at all, it's for a different reason.

    John Saunders
    John Saunders, Nov 10, 2004
    #3
  4. =?Utf-8?B?UGF1bA==?=

    Scott Allen Guest

    Hi Paul:

    The Fill method is going to block (wait) until it has the results from
    the stored procedure. If there is a timeout it will throw an
    exception. Any chance you have this code inside of a try catch that is
    eating the exception?

    Depending on which data provider you are using you can generally set a
    timeout threshold (like the CommandTimeout property of a SqlCommand
    object).

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Tue, 9 Nov 2004 16:14:04 -0800, "Paul"
    <> wrote:

    >Hi just wondering if there is a way to set up a wait for object in vb.net as
    >if a put a delay in between the fill and the databind things work ok, but if
    >not the page is reloading without the updated information,(stored procedure
    >is taking too long to complete).
    >
    >the time needed for this delay will change depending on the time the "stored
    >procedure" which will vary, takes to excecute.
    >
    > dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    > (delay -for loop)
    > datagrid.DataBind() 'bind the data grid.
    >This is related to a previous post, that did not include enough information.
    >thanks.
    Scott Allen, Nov 10, 2004
    #4
  5. Hi Scott, thanks for the response, not sure what you mean by eating the
    exception.
    I am using a try, catch and stepped through it, does not seem to create an
    exception,
    try
    several select commands like below
    dataadapter.SelectCommand().Parameters("@param1").Value = somevalue
    dataadapter fill
    delay
    datagrid bind
    Catch ex As Exception
    s_message = ex.Message()
    End Try
    The stored procedure builds the query dynamically based on inputs, and uses
    the EXEC sp_executesql.
    Think I will set the timeout period as well as this has not been set.
    "Scott Allen" wrote:

    > Hi Paul:
    >
    > The Fill method is going to block (wait) until it has the results from
    > the stored procedure. If there is a timeout it will throw an
    > exception. Any chance you have this code inside of a try catch that is
    > eating the exception?
    >
    > Depending on which data provider you are using you can generally set a
    > timeout threshold (like the CommandTimeout property of a SqlCommand
    > object).
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    > On Tue, 9 Nov 2004 16:14:04 -0800, "Paul"
    > <> wrote:
    >
    > >Hi just wondering if there is a way to set up a wait for object in vb.net as
    > >if a put a delay in between the fill and the databind things work ok, but if
    > >not the page is reloading without the updated information,(stored procedure
    > >is taking too long to complete).
    > >
    > >the time needed for this delay will change depending on the time the "stored
    > >procedure" which will vary, takes to excecute.
    > >
    > > dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    > > (delay -for loop)
    > > datagrid.DataBind() 'bind the data grid.
    > >This is related to a previous post, that did not include enough information.
    > >thanks.

    >
    >
    =?Utf-8?B?UGF1bA==?=, Nov 10, 2004
    #5
  6. Seems to be working now without the delay, had something wrong with a
    validator so removed it and added another. Thanks.


    "John Saunders" wrote:

    > "Paul" <> wrote in message
    > news:...
    > > Hi just wondering if there is a way to set up a wait for object in vb.net
    > > as
    > > if a put a delay in between the fill and the databind things work ok, but
    > > if
    > > not the page is reloading without the updated information,(stored
    > > procedure
    > > is taking too long to complete).
    > >
    > > the time needed for this delay will change depending on the time the
    > > "stored
    > > procedure" which will vary, takes to excecute.
    > >
    > > dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    > > (delay -for loop)
    > > datagrid.DataBind() 'bind the data grid.

    >
    > Paul,
    >
    > DataAdapter.Fill is synchronous. When it returns, the data have all been
    > loaded. If a delay is helping things at all, it's for a different reason.
    >
    > John Saunders
    >
    >
    >
    =?Utf-8?B?UGF1bA==?=, Nov 10, 2004
    #6
  7. Seems to be working now without the delay, had something wrong with a
    validator so removed it and added another. Thanks.

    "Scott Allen" wrote:

    > Hi Paul:
    >
    > The Fill method is going to block (wait) until it has the results from
    > the stored procedure. If there is a timeout it will throw an
    > exception. Any chance you have this code inside of a try catch that is
    > eating the exception?
    >
    > Depending on which data provider you are using you can generally set a
    > timeout threshold (like the CommandTimeout property of a SqlCommand
    > object).
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
    >
    > On Tue, 9 Nov 2004 16:14:04 -0800, "Paul"
    > <> wrote:
    >
    > >Hi just wondering if there is a way to set up a wait for object in vb.net as
    > >if a put a delay in between the fill and the databind things work ok, but if
    > >not the page is reloading without the updated information,(stored procedure
    > >is taking too long to complete).
    > >
    > >the time needed for this delay will change depending on the time the "stored
    > >procedure" which will vary, takes to excecute.
    > >
    > > dataadapter.Fill(dataset, "stored procedure") 'fill the dataset.
    > > (delay -for loop)
    > > datagrid.DataBind() 'bind the data grid.
    > >This is related to a previous post, that did not include enough information.
    > >thanks.

    >
    >
    =?Utf-8?B?UGF1bA==?=, Nov 10, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob
    Replies:
    2
    Views:
    549
  2. Tsahi Levent-Levi
    Replies:
    0
    Views:
    2,009
    Tsahi Levent-Levi
    Aug 15, 2003
  3. Rick
    Replies:
    1
    Views:
    548
    Michael Borgwardt
    Nov 17, 2003
  4. Huey

    How to make "fork/wait" to WAIT longer?

    Huey, Mar 1, 2004, in forum: C Programming
    Replies:
    1
    Views:
    1,942
    -berlin.de
    Mar 1, 2004
  5. Klaus
    Replies:
    1
    Views:
    304
    Joona I Palaste
    Dec 9, 2004
Loading...

Share This Page