ube100
asked on
Object reference not set to an instance of an object...
Hi,
This following C# code snippet throwing an error when I execute in my program.
ResultCode leResultCode = moSearch.WebDedupeContact( ref lsErrorInfo, ref loIXMLDoc, lsFirstName + " " + lsLastName, "", "", "", "", "", "", Constants.IntelliSearch.Mi nimumMatch Score);
The error is: Object reference not set to an instance of an object...
I have view the definition for the class ResultCode as shwon below:
ResultCode WebDedupeContact(ref string ErrorInfo, ref IXMLDOMDocument2 XMLDoc, string SlxContact, string SlxAccountID, string Address, string City, string State, string Postcode, string Country, short MinimumMatchScore);
[DispId(1610809829)]
And on the top of interface where we got this declaration also have these attribute as well for the interface:
[Guid("903FB89C-F136-418D- A72D-0B917 B1748BB")]
[TypeLibType(4304)]
What are these mean? and most importantly where could this error be generated from?
This following C# code snippet throwing an error when I execute in my program.
ResultCode leResultCode = moSearch.WebDedupeContact(
The error is: Object reference not set to an instance of an object...
I have view the definition for the class ResultCode as shwon below:
ResultCode WebDedupeContact(ref string ErrorInfo, ref IXMLDOMDocument2 XMLDoc, string SlxContact, string SlxAccountID, string Address, string City, string State, string Postcode, string Country, short MinimumMatchScore);
[DispId(1610809829)]
And on the top of interface where we got this declaration also have these attribute as well for the interface:
[Guid("903FB89C-F136-418D-
[TypeLibType(4304)]
What are these mean? and most importantly where could this error be generated from?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
As soon as I hit this line:
ResultCode leResultCode = moSearch.WebDedupeContact( ref lsErrorInfo, ref loIXMLDoc, lsFirstName + " " + lsLastName, "", "", "", "", "", "", Constants.IntelliSearch.Mi nimumMatch Score);
ResultCode leResultCode = moSearch.WebDedupeContact(
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yes,
moSearch has been initialized.
moSearch has been initialized.
Check all the other variables, fe ref lsErrorInfo, ref loIXMLDoc
Do you have that functions also in debug (perhaps there is an issue in that function)
Do you have that functions also in debug (perhaps there is an issue in that function)
ASKER
I have check the moSearch and that is null when we executing it so what should look for?
private iSearchSLX moSearch
public iSearchSLX Search
{
get
{
return moSearch;
}
}
This is how it's been created. This code is perfectly working code but I'm investigating something at the moment and propbably it is not creating the object under the condition I'm working? How do I find out about what causing it to not to create that object? Something to with Singleton pattern?
private iSearchSLX moSearch
public iSearchSLX Search
{
get
{
return moSearch;
}
}
This is how it's been created. This code is perfectly working code but I'm investigating something at the moment and propbably it is not creating the object under the condition I'm working? How do I find out about what causing it to not to create that object? Something to with Singleton pattern?
ASKER
ResultCode is not a class it is a enum class and that definition is for WebDedupeContact which was defined in a interfcace.