FW-Mike
06-09-2005, 12:22 PM
You guys always seem to help me out, so here goes another question.
Preface: I am working on a sync between Quickbooks and the Web. The below code is in a loop and is meant to prepare variables for sync. Here is the pertaining snippet of code:
string Name = customerRet.Name.GetValue();
string CompanyName = customerRet.CompanyName.GetValue();
string Salutation = customerRet.Salutation.GetValue();
The error I get when executing the code is:
Additional information: Object reference not set to an instance of an object.
Regarding the `string Salutation` line. I know why it is doing this, there is no salutation in the given row.
The problem is that I cannot think of a proper way to check to see if it exists and only proceed if so. I cannot use IsEmpty() -- same error.
What should I do here?
Preface: I am working on a sync between Quickbooks and the Web. The below code is in a loop and is meant to prepare variables for sync. Here is the pertaining snippet of code:
string Name = customerRet.Name.GetValue();
string CompanyName = customerRet.CompanyName.GetValue();
string Salutation = customerRet.Salutation.GetValue();
The error I get when executing the code is:
Additional information: Object reference not set to an instance of an object.
Regarding the `string Salutation` line. I know why it is doing this, there is no salutation in the given row.
The problem is that I cannot think of a proper way to check to see if it exists and only proceed if so. I cannot use IsEmpty() -- same error.
What should I do here?
