>>>>>>Do you know where can I find why I don't have SiteID in the DataSet? Is there any other file in addition to the ASPX/ASPX.cs I have to re-check?
>>>>>>
>>>>>>Thanks in advance.
>>>>>_________
>>>>>
>>>>>The help file says that Columns is a collection
>>>>>
>>>>>see:
http://msdn.microsoft.com/en-us/library/system.data.datacolumncollection.contains(VS.71).aspx>>>>
>>>>True. But why do you mention this?
>>>>Regards,
>>>>Viv
>>>
>>>Ok, misinterpreted the question. I had read 'do you know how I can know whether SiteId is in the dataset'
>>
>>Yes, I was also thinking why did you tell me this?
>>
>>Ok, as a bonus question for you - what is the property that tells me if my DataSet table has Rows? Yesterday I just added an extra check before this code to for this column <> null (I guess it's an akward workaround, but it worked), but I also found that if my query didn't return records (and, BTW, after the query the SiteID is indeed in the columns of the table of the Dataset) the Excel still was trying to create an empty file and obviously I don't want it.
>
>
>Isn't there something like DataRow.Count or Row.Count ? Both rows and columns are a collection.
>[ I'm still learning .net and playing around a few hours a week - I may be wrong ]
Yes, looks like dts.Tables[0].Rows.Count > 0 should do the trick.
If it's not broken, fix it until it is.
My Blog