----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: SitaramanM Message 6 in Discussion Hi Baburaj : IDictionaryEnumerator is an interface. This means that you CANNOT instantiate. So the code snippet IDictionaryEnumerator myEnumerator = new IDictionaryEnumerator (); will throw a compiler error Balaji : In your case the line IDictionaryEnumerator myEnumerator = hashTbl.GetEnumerator(); throws the error. Right!! In this line the only object whose member is accessed is the hashtbl object. This object is getting initialized in the previous line by type casting tempobj and then assigning it to hashtbl. This tempobj in turn is initialized by the dbManager.Execute method. Your problem here is that he dbManager.Execute method is returning a null object which is getting assigned to tempobj, and when tempobj is inturn typecast to hashtbl, this will also be null. So when you call the Getenumerator on a null object, i.e. hashtbl, you get the exception. Check out the logic of the Execute method and also the data u r passing to this method to ensure that the method returns a valid hashtable. Also you should preferrably check the value of the tempobj after executing th execute method call and if tempobj is null then you should do error handling as applicable in ur business context would suggest that you use VS.Net debugging features and breakpoints to evaluate the objects in the future, as this will save a lot of your time and allow u to debug easily hth regards, sr ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDotNet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
