You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by sanjeev40084 <sa...@hotmail.com> on 2009/07/14 21:10:40 UTC

The given key was not present in the dictionary.

System.Collections.Generic.KeyNotFoundException was caught
  Message="The given key was not present in the dictionary."
  Source="mscorlib"
  StackTrace:
       at System.ThrowHelper.ThrowKeyNotFoundException()
       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at test.DataAccess.DataSources.get_test) in
C:\test\DataAccess\DataSources.cs:line 47
       at test.GetEmployeeID() in C:\test\DataAccess\Employee cs:line 22
  InnerException: 

I am getting this error, while accessing a method. I think it is because one
of the field is returning null from the sql query. However i did try to fix
it checking the value of field (saying..if it is null then get ' ' else get
the value).

Any clue how i can fix it?

-- 
View this message in context: http://www.nabble.com/The-given-key-was-not-present-in-the-dictionary.-tp24485925p24485925.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-cs-help@ibatis.apache.org


Re: The given key was not present in the dictionary.

Posted by sanjeev40084 <sa...@hotmail.com>.
Never mind..i got it fixed. 
-- 
View this message in context: http://www.nabble.com/The-given-key-was-not-present-in-the-dictionary.-tp24485925p24498176.html
Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-cs-help@ibatis.apache.org


Re: The given key was not present in the dictionary.

Posted by Michael McCurrey <mm...@gmail.com>.
Can you show us your map file...

On Tue, Jul 14, 2009 at 12:10 PM, sanjeev40084 <sa...@hotmail.com>wrote:

>
> System.Collections.Generic.KeyNotFoundException was caught
>  Message="The given key was not present in the dictionary."
>  Source="mscorlib"
>  StackTrace:
>       at System.ThrowHelper.ThrowKeyNotFoundException()
>       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
>       at test.DataAccess.DataSources.get_test) in
> C:\test\DataAccess\DataSources.cs:line 47
>       at test.GetEmployeeID() in C:\test\DataAccess\Employee cs:line 22
>  InnerException:
>
> I am getting this error, while accessing a method. I think it is because
> one
> of the field is returning null from the sql query. However i did try to fix
> it checking the value of field (saying..if it is null then get ' ' else get
> the value).
>
> Any clue how i can fix it?
>
> --
> View this message in context:
> http://www.nabble.com/The-given-key-was-not-present-in-the-dictionary.-tp24485925p24485925.html
> Sent from the iBATIS - User - Cs mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-cs-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-cs-help@ibatis.apache.org
>
>


-- 
Michael J. McCurrey
Read with me at http://www.mccurrey.com
http://chaoticmindramblings.blogspot.com/