public class boPeople:ABusinessObject { public boPeople() { this.TableName="People"; } public DataSet GetPeople() { return this.GetDataSet( "CREATE TABLE #Test (cName VARCHAR(10), nAge Int)\r\n"+ "INSERT INTO #Test (cName,nAge) VALUES ('John', 40)\r\n"+ "INSERT INTO #Test (cName,nAge) VALUES ('Mel', 20)\r\n"+ "INSERT INTO #Test (cName,nAge) VALUES ('Suzy', 29)\r\n"+ "SELECT * FROM #Test\r\n"+ "DROP TABLE #Test\r\n"+ "CREATE TABLE #TestPart2 (bSelectAll BIT)\r\n"+ "INSERT INTO #TestPart2 (bSelectAll) VALUES (1)\r\n"+ "SELECT * FROM #TestPart2\r\n"+ "DROP TABLE #TestPart2") } }After I call GetPeople(), the bizobj's dataset contains two tables: People, and People1, all filled in properly.
protected string[] GetDataTables(DataSet ds, string tableName, string databaseKey) { string[] DataTables; mmDataAccessBase dao = this.GetDataAccessObject(databaseKey); if (dao.StateChangeAllTables && ds.Tables.Count > 0) { DataTables = new string[ds.Tables.Count]; for(int i=0; i < ds.Tables.Count; i++) { DataTables[i] = ds.Tables[i].TableName; } } else { DataTables = new string[] {tableName}; } return DataTables; }Since dao.StateChangeAllTables is false, the else branch is followed and the array returned contains only "People" instead of "People" and "People1".