A strange problem...

Discussion in 'ASP .Net Web Services' started by Ginny, Sep 8, 2006.

  1. Ginny

    Ginny Guest

    Hi,
    I have a simple web service that returns a dataset. Its very simple. i call
    the web service from a windows app. it works abosolutely fine when i can the
    web service method synchronously. but when i try to call the method
    asynchronosuly using the 'beginxxx' and 'endxxxx' it does not give any error
    but at the same time, the datagrid on the form does not show any data as
    well. the only code in my windows form is menitoned below. Kindly if some
    one can assist.


    private void button1_Click(object sender, System.EventArgs e)
    {
    Asynch.Service1 obj = new Asynch.Service1();
    AsyncCallback cb = new AsyncCallback(callback);
    obj.BeginGetDataAll(cb,obj);
    }

    private void callback(IAsyncResult ar)
    {
    Asynch.Service1 obj = (Asynch.Service1)ar.AsyncState;
    DataSet ds = obj.EndGetDataAll(ar); // I have tried type casting also
    here but still does not work --- DataSet ds =
    (DataSet)obj.EndGetDataAll(ar);
    dataGrid1.DataSource = ds.Tables[0];

    }

    --
    Regards
    Ginny
    Ginny, Sep 8, 2006
    #1
    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. Kload

    Strange Timing Problem

    Kload, Oct 23, 2003, in forum: VHDL
    Replies:
    2
    Views:
    576
    Kload
    Oct 23, 2003
  2. Akshaye
    Replies:
    1
    Views:
    720
    Hemant Gupta
    Feb 9, 2004
  3. Pedro Miguel Carvalho
    Replies:
    2
    Views:
    1,112
    Pedro Miguel Carvalho
    Oct 25, 2004
  4. Harvey Twyman
    Replies:
    8
    Views:
    550
    August Derleth
    Oct 25, 2003
  5. championsleeper
    Replies:
    0
    Views:
    565
    championsleeper
    Jan 26, 2005
Loading...

Share This Page