Click here to Skip to main content
13,199,318 members (45,311 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
there is no row at position 0
How to Reslove Code---


<pre lang="C#">if (Session[&quot;remark&quot;].ToString() == &quot;0&quot;)
{
Session[&quot;remark&quot;] = &quot;1&quot;;
try {
SendleaveDetailS();
}
catch(Exception Ex)
{

}
}</pre>

What I have tried:

i want to resolve exception i have mention code so please help me
Posted 14-Feb-16 23:33pm
Comments
Jochen Arndt 15-Feb-16 5:42am
   
Which function call throws the exception?

To avoid it, check the condition before calling the function. Alternatively handle it inside the catch statement.

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You cannot 'resolve' the exception: you catch it and handle, in the catch block, the error.
If there is 'no row at position 0' then you probably have a failed query. Depending on your scenario you could inform the user of the failure, or terminate the application or attack the pirates or whatever...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web04 | 2.8.171020.1 | Last Updated 15 Feb 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100