3
Reply

Retrieve value from stored procedure as dataset and add to datatable

Becky Bloomwood

Becky Bloomwood

Feb 18 2011 1:44 AM
4k
Hi,I have declared a datatable that is somehow similar to the table in the database.


 

DataTable dtgvCriticalTerms = null; //Reflect the CT table in SQL Server

dtgvCriticalTerms = vrmdb.Get_CriticalTerms("ContractID").Tables[0];


Since the query string is ContractID, is my next step needs to declare a dataset such that it can store the data associated with this table?

Once i have this dataset, i need to add it back to the datatable that i have defined it early before?
is it made use of this code:

 

dtgvCriticalTerms = ViewState[viewStateGVCTName] as DataTable;
Thks!



Answers (3)