The sqlhelper class in Microsoft. applicationblocks. Data has a terrible problem. When using the sqlhelper. filldataset series functions, if the dataset contains two more data tables, you can only specify the names after the first two data tables to change to table3.. N...
View itsSource code:
// Add the table mappings specified by the user
If (tablenames! = NULL & tablenames. length> 0)
{
String tablename = "table ";
For (INT Index = 0; index <tablenames. length; index ++)
{
If (tablenames [Index] = NULL | tablenames [Index]. length = 0) throw new argumentexception ("The tablenames parameter must contain a list of tables, a value was provided as null or empty string. "," tablenames ");
Dataadapter. tablemappings. Add (tablename, tablenames [Index]);
Tablename + = (index + 1 ). tostring (); // The Problem Is that tablename is not "table2... tablen increases progressively, instead of "table12, table123, table1... n. Just write this method.
Tablename = "table" + (index + 1). tostring ();
}
}