Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Elusive DataSet
Message
De
30/04/2008 04:09:38
 
 
À
30/04/2008 03:54:26
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01314012
Message ID:
01314111
Vues:
21
>>>Hi everybody,
>>>
>>>I am working on a complex web page that I originally copied from existing. I made bunch of the adjustments in it to point to the correct table. This page has a GridView with SQLDataSource and also DataSet is created in code.
>>>
>>>I verified that all my SELECT statements in ASPX and aspx.cs for that page include the SiteID field (I added it).
>>>
>>>However, in the method that creates an Excel file from it I have the following code:
>>>
>>>
>>>DataSet dtsCopy = dts.Copy();
>>>
>>>            dtsCopy.Tables[0].Columns.Remove("lettercode");
>>>            dtsCopy.Tables[0].Columns.Remove("SiteID");
>>>            dtsCopy.Tables[0].Columns.Remove("deleted");
>>>
>>>
>>>and the second line is failing (Column SiteID is not found).
>>>
>>>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'
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform