Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What I am doing wrong here?
Message
De
31/05/2013 18:25:22
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01575375
Message ID:
01575378
Vues:
59
This message has been marked as the solution to the initial question of the thread.
>>>Hi everybody,
>>>
>>>In the main method I declared dtReturn this way
>>>
>>>
>>> DataTable dtReturn = new DataTable();         
>>>
>>>         AssembleTableForReturn(dtReturn);
>>>
>>>
>>>In that Assemble method I add columns to the table.
>>>
>>>Then in that same main method I have
>>>
>>>if (database.ExecuteSqlCommand(sqlCommand, out ds, ref messageText, ref statusCode))
>>>            {
>>>               AddInformationToResult(ds, dtReturn, pod);
>>>            }
>>>
>>>
>>>where this method is supposed to add a row to that table this way:
>>>
>>>newRow = dtReturn.NewRow();
>>>
>>>            newRow["resource1"] = pod;        
>>>
>>>            newRow["lname"] = podDescription;
>>>
>>>However, in datatable visualizer I see that table still empty (no rows added).
>>>
>>>Do you see what I may be missing here?
>>>
>>>Thanks in advance.
>>Are you visualizing newRow or dtReturn?
>
>dtReturn.
try
dtReturn.Rows.Add(newRow);
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform