Microsoft. applicationblocks. Data

Source: Internet
Author: User

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 ();

}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.