Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 EXCEPTION_ACCESS_VIOLATION. ..........

Author  Topic 

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2002-02-05 : 22:07:07
i have a procedure which takes @act as in parameter...

@act can be null if null entire set
if not null details of a one account..

select cast(a.account_id as numeric),c.M1_FULL_USAGE_QTY,
a.plan1, c.M1_RATE_RANK ,b1.Free_Min,b1.Direct_Connect,
b1.Phone_Connect,b1.Rate,a.plan2, b2.Free_Min,
b2.Direct_Connect, b2.Phone_Connect , b2.Rate from
Rateplan_Analysis c,

(select owner_id,account_id,
substring(rate_scheme ,1,(charindex(',',rate_scheme )-1)) plan1,

ltrim(substring(rate_scheme ,(charindex(',',rate_scheme)+1),len(rate_scheme)-charindex(',',rate_scheme) )) plan2

from
(select owner_id,account_id, rate_scheme =case when
sum(M1_FULL_USAGE_QTY) <161 then 'Grid 28 , Saver'
when sum(M1_FULL_USAGE_QTY) >160 and sum(M1_FULL_USAGE_QTY) <551 then 'Saver , Quality'
when sum(M1_FULL_USAGE_QTY) >550 and sum(M1_FULL_USAGE_QTY) <1101 then 'Quality , Premium'
when sum(M1_FULL_USAGE_QTY) >1100 then 'Premium , X' end from Rateplan_Analysis where owner_id= isnull(@act,owner_id) group by account_id,owner_id )t) a, (select a.id,Rate_Plan,Direct_Connect,Phone_Connect,Free_Min,Rank,Rate from Plan_Master a, Plan_det b where a.id*=b.id) b1,
(select a.id,Rate_Plan,Direct_Connect,Phone_Connect,Free_Min,
Rank,Rate from Plan_Master a, Plan_det b where a.id*=b.id) b2
where a.account_id=c.account_id and b1.Rate_Plan=plan1 and b2.Rate_Plan=plan2 and b1.Rank=c.M1_RATE_RANK and
c.M1_RATE_RANK=b2.rank order by cast(a.account_id as numeric), c.M1_RATE_RANK

if i execute the query alone it works fine....

if i run the procedure....
i get a error..

ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 8 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.

what can be the possible thing gone wrong.


======================================
Ask to your self before u ask someone

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2002-02-05 : 22:15:24


the problem just now i found was by using the cursor....

when i remove the declare cursor statment it works...
i need to do row processing......

======================================
Ask to your self before u ask someone
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-02-06 : 12:17:08
What version/Service pack are you on?

Access Violations are typically (99.9% of the time) bugs in the product. So if you are on the latest Service pack, and you still get the AV, open an MS Support case (It will be free because it is a bug) and they will either give you a workaround or a fix.

-Chad

Go to Top of Page

khalik
Constraint Violating Yak Guru

443 Posts

Posted - 2002-02-06 : 20:25:05


what is the latest service pack..
currently i am working on sql 7.0 on windows 98
latter i will be moving to sql 2000
so what is the latest service pack for win'98



======================================
Ask to your self before u ask someone
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-02-07 : 12:40:47
I am talking about the SQL SP. SP 3 is the latest for 7.0

-Chad

Go to Top of Page
   

- Advertisement -