Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can we load multiple tables in a DataSet
How can we load multiple tables in a DataSet ?
✍: Guest
objCommand.CommandText = "Table1" objDataAdapter.Fill(objDataSet, "Table1") objCommand.CommandText = "Table2" objDataAdapter.Fill(objDataSet, "Table2")
Above is a sample code which shows how to load multiple “DataTable” objects in one “DataSet” object. Sample code shows two tables “Table1” and “Table2” in object ObjDataSet.
lstdata.DataSource = objDataSet.Tables("Table1").DefaultView
In order to refer “Table1” DataTable, use Tables collection of DataSet and the Defaultview object will give you the necessary output.
2007-10-24, 4974👍, 0💬
Popular Posts:
How To Run a JUnit Test Class? A JUnit test class usually contains a number of test methods. You can...
What is the significance of Finalize method in .NET? .NET Garbage collector does almost all clean up...
What is the significance of Finalize method in .NET? .NET Garbage collector does almost all clean up...
What will be printed as the result of the operation below: main() { int x=10, y=15; x = x++; y = ++y...
Why does malloc(0) return valid memory address? What's the use? malloc(0) does not return a non-NULL...