Hi to Everyone,
I had struck in an scenario please help me to solve this.
dataset dsA;
dataset dsB;
dataset dsCommon;
public void Athread()
{
dsA = ExecSP("Athread");
if (dsA.Tables[0].Rows.Count > 0)
{
dsCommon.Merge(dsA);
gvthread.DataSource = dsCommon;
gvthread.DataBind();
}
return;
}
public void Bthread()
{
dsB = ExecSP("Bthread");
if (dsB.Tables[0].Rows.Count > 0)
{
dsCommon.Merge(dsB);
gvthread.DataSource = dsCommon;
gvthread.DataBind();
}
return;
}
Please help me in Threading and to finish this...
The Above code is working fine, but it bnids the data of two stored procedures and display in a single minute.,
My scenario is
1) It has to bind the less minute stored procedure at first, then it has to wait for other stored procedure which in 8 sec
2) After getting the data of anotherstored procedure it has to append the data to the grid by automatically.
3) Only one Single Event is fired. Process should be happening.
There is no protocol to use only threading, we can use anything., Some Experts say that using ajax requests is better than threading, But i have no idea...
So please get in and solve...
For more Clearance Click below...
How to fill a Gridview With Two datasets Async..
There is an Another Name for this Whole Process (i.e) Asynchronous
I had struck in an scenario please help me to solve this.
My Scenario:
I will get some set of datas from two stored procedure. I will store first stored procedures data into datasetA. And data of second Stored procedure will be stored in datasetB. i have an another common datasetC. On that DatasetC i am going to merge these two datasets.
I will get some set of datas from two stored procedure. I will store first stored procedures data into datasetA. And data of second Stored procedure will be stored in datasetB. i have an another common datasetC. On that DatasetC i am going to merge these two datasets.
After Merging the Datasets i have to show in Gridview.
Now my Problem is,
I have to run those two stored procedures at a same time using threadstart(threading).
First Stored Procedure has a time delay of 8sec, and second SP has a time delay of 3 sec,
I need to fill the grid view when the second one got finished and it has to wait for the first stored procedure, After First Sp got finished it needs to merge with second one and it have to shown in grid view.
please help me to get clear out of this.
Now my Problem is,
I have to run those two stored procedures at a same time using threadstart(threading).
First Stored Procedure has a time delay of 8sec, and second SP has a time delay of 3 sec,
I need to fill the grid view when the second one got finished and it has to wait for the first stored procedure, After First Sp got finished it needs to merge with second one and it have to shown in grid view.
please help me to get clear out of this.
For your Kind Reference:
First Stored Procedure
Create procedure Athread
as
begin
WAITFOR DELAY '00:00:08'
select * from area where areaname LIKE 'C%';
end
First Stored Procedure
Create procedure Athread
as
begin
WAITFOR DELAY '00:00:08'
select * from area where areaname LIKE 'C%';
end
Second Stored Procedure
Create procedure Bthread
as
begin
WAITFOR DELAY '00:00:03'
select * from area where areaname LIKE 'F%';
end
Create procedure Bthread
as
begin
WAITFOR DELAY '00:00:03'
select * from area where areaname LIKE 'F%';
end
I am Calling the below code in an Button Event
Thread thread1 = new Thread(new ThreadStart(Athread));
Thread thread2 = new Thread(new ThreadStart(Bthread));
thread1.Start();
thread2.Start();
I am Having two Functions to call these Sp and two display in Grid view
Thread thread1 = new Thread(new ThreadStart(Athread));
Thread thread2 = new Thread(new ThreadStart(Bthread));
thread1.Start();
thread2.Start();
I am Having two Functions to call these Sp and two display in Grid view
dataset dsA;
dataset dsB;
dataset dsCommon;
public void Athread()
{
dsA = ExecSP("Athread");
if (dsA.Tables[0].Rows.Count > 0)
{
dsCommon.Merge(dsA);
gvthread.DataSource = dsCommon;
gvthread.DataBind();
}
return;
}
public void Bthread()
{
dsB = ExecSP("Bthread");
if (dsB.Tables[0].Rows.Count > 0)
{
dsCommon.Merge(dsB);
gvthread.DataSource = dsCommon;
gvthread.DataBind();
}
return;
}
Please help me in Threading and to finish this...
The Above code is working fine, but it bnids the data of two stored procedures and display in a single minute.,
My scenario is
1) It has to bind the less minute stored procedure at first, then it has to wait for other stored procedure which in 8 sec
2) After getting the data of anotherstored procedure it has to append the data to the grid by automatically.
3) Only one Single Event is fired. Process should be happening.
There is no protocol to use only threading, we can use anything., Some Experts say that using ajax requests is better than threading, But i have no idea...
So please get in and solve...
For more Clearance Click below...
How to fill a Gridview With Two datasets Async..
There is an Another Name for this Whole Process (i.e) Asynchronous
This comment has been removed by the author.
ReplyDelete