| Author |
Topic |
|
vedjha
Posting Yak Master
228 Posts |
Posted - 2009-02-27 : 09:19:48
|
| I have created procedures which calculate the unlimited level of Binary tree. When it process connection timeout Exeption Ocurs..plz helpme .. How to prevent Connectin Timeout. I have approax 8000 Records and procedure is to process 8000 times. and calculates their Unlimited depth.Ved Prakash Jha |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-27 : 09:28:56
|
Increase CommandTimeOut property in your code from default 30 seconds to 300 seconds (5 minutes). E 12°55'05.63"N 56°04'39.26" |
 |
|
|
vedjha
Posting Yak Master
228 Posts |
Posted - 2009-02-27 : 09:38:20
|
| actualy I have set CommandTimeOut property 9999999 seconds Coneection Timeout shows:there are approx 50-60 ID where Procedure takes 1.3 minutes to runVed Prakash Jha |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-27 : 09:45:23
|
Oh, an exception?Have you checked your code for circular reference? Or are you using nested procedures? What is nestlevel? Greater than 32?Post the code, please. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
vedjha
Posting Yak Master
228 Posts |
Posted - 2009-02-27 : 10:00:19
|
| members table structure:create table members{vaid varchar(8) Primary key, //Associate IDvspid varchar(8) not null, //Sponsor IDcplacement char(1) not null // Place as left or Right}Data:vaid vspid cplacement1 0 L2 1 L3 1 R4 2 L5 2 R6 3 L7 3 R8 4 L9 5 R10 4 L 11 4 L12 5 R now i have to check that How many Level having Associate ID "1" there is 5 level for 1procedure:create proc prcLeftPayment @sid varchar(9),@fromdate datetime,@endDate datetimeas begin if exists (select * from members where vaid=@sid) begin WITH CatTree (vaid, vspID,cplacement, Level) AS ( SELECT vaID, vspID,cplacement 1 As [Level] FROM members m join scratch s on m.vaid=s.vat_id join packages p on s.vpackid=p.vid WHERE vspid=@sid and cplacement='L' UNION ALL SELECT C.vaid, C.vspID,C.cplacement, Level + 1 FROM members C INNER JOIN CatTree ON CatTree.vaid= C.vspid join scratch s1 on c.vaid=s1.vat_id join packages p1 on s1.vpackid=p1.vid ) SELECT * FROM CatTree where dtdoj between @fromdate and @enddate and cstatus='V' Order By vaid end else begin print 'Please check your ID' endendGOVed Prakash Jha |
 |
|
|
vedjha
Posting Yak Master
228 Posts |
Posted - 2009-03-03 : 02:24:04
|
| i m facing this problem now a days.I haven't get any solution for itplz hel meVed Prakash Jha |
 |
|
|
vedjha
Posting Yak Master
228 Posts |
Posted - 2009-03-03 : 02:24:30
|
| plz help me...Ved Prakash Jha |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-03-03 : 04:12:16
|
| create proc prcLeftPayment @sid varchar(9),@fromdate datetime,@endDate datetimeas begin if exists (select * from members where vaid=@sid)beginWITH CatTree (vaid, vspID,cplacement, Level)AS(SELECT vaID, vspID,cplacement 1 As [Level] FROM members m join scratch s on m.vaid=s.vat_idjoin packages p on s.vpackid=p.vidWHERE vspid=@sid and cplacement='L' UNION ALLSELECT C.vaid, C.vspID,C.cplacement, Level + 1 FROM members C INNER JOIN CatTree ONCatTree.vaid= C.vspidjoin scratch s1 on c.vaid=s1.vat_idjoin packages p1 on s1.vpackid=p1.vid)SELECT * FROM CatTreewhere dtdoj between @fromdate and @enddateand cstatus='V'Order By vaid option (maxrecursion 0) |
 |
|
|
shaggy
Posting Yak Master
248 Posts |
Posted - 2009-03-03 : 04:14:25
|
| u have left ",'" near cplacementSELECT vaID, vspID,cplacement 1 As [Level] |
 |
|
|
|