Thanks, that is all understood, but I can't see it in this case.
In the secod row the cr.Keys["@sch_id"] contains the value
{35b92307-a090-4c27-9a66-a57b605eff92},
whilst in row 5 cr.Keys["@sch_id"] it is null.
I thought that these were both the same variable, if this is not the case,
then how to I access the {35b92307-a090-4c27-9a66-a57b605eff92}?
Thanks, Richard
>> I have a strange null value, which is displayed in the screen print here:
>>
[quoted text clipped - 15 lines]
>
> Jon
Jon Skeet [C# MVP] - 30 Aug 2007 10:47 GMT
> Thanks, that is all understood, but I can't see it in this case.
>
[quoted text clipped - 4 lines]
> I thought that these were both the same variable, if this is not the case,
> then how to I access the {35b92307-a090-4c27-9a66-a57b605eff92}?
Oops, yes I see now.
However, you need to look really carefully at the keys. You're asking
for "sch_id" but the only key in there is "@sch_id". Note the "@" at
the front. (Likewise row 5 shows cr.Keys["sch_id"].)
Jon
RichB - 30 Aug 2007 10:49 GMT
Thanks, good spot....I couldn't see it for looking!!
>> Thanks, that is all understood, but I can't see it in this case.
>>
[quoted text clipped - 13 lines]
>
> Jon
Jeffrey Tan[MSFT] - 31 Aug 2007 07:12 GMT
Hi Richard,
Is your problem resolved? Yes, while retrieving the Hashtable.Item property
using a key, we should use the same key for it(without missing the "@"
character). As stated in the "Property Value" section in the link below, if
the key you passed is not the previous one(not found), the Hashtable.Item
will return a null reference. This explains the behavior:
http://msdn2.microsoft.com/en-us/library/system.collections.hashtable.item(V
S.71).aspx
Anyway, if you need further help, please feel free to feedback, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.