Re: in case last mail is not sent out

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Let me know if that solves your problem, I am curious to know. Then we can
speculate as to why it works.

Joe

--
www.xcomplica.com


"Wade Ding" wrote:

Thanks, Joe.

Still I don't get it. Is this a BTS Bug?


Thanks

Wade

"Joe C" <Joe_C@xxxxxxxxxxxxxxxx> wrote in message
news:AA146D6F-79E1-49B9-B473-ECAEDD262CF3@xxxxxxxxxxxxxxxx
Hi Wade,

I think I have seen this before, try declaring a variable of type
DataTable,
assign Table[0] to it, do a check to ensure it's not null, and then access
the Count property:

if(oRS.Tables.Count > 0)
{
myTable = oRS.Tables[0];
if(myTable != null && myTable.Rows.Count > 0) // Rows is RED
{

Hope that helps.

Joe
--
www.xcomplica.com


"Wade Ding" wrote:

Hi,

I just send a post, but got a error message. This post is pure text.

oRS is DataSet. I wrote this code snippet inside a expression shap. The
first line is Ok, while the second line complains "an object reference is
required for non-static field, method or property 'Count'.

I have no idea what is happening here.

if(oRS.Tables.Count > 0)
{
if(oRS.Tables[0].Rows.Count > 0) // Rows is RED
{
.....

Wade






.