I'm trying to populate a dataset that contains 2 tables, using MS Applications Blocks.
In my searches on the internet, it seems that populating 2 tables in a dataset is as simple as:
[size=+0]dataAdapter1.fill(dataset1("table1")
dataAdapter1.newSelectCommandHere
dataAdapter1.fill(dataset1("table2")[/size]
But with the SQLHelper class, I don't seem to be able to specify which table to populate - my code is:
[size=+0]
Any suggestions?
Thansk!
Amber
[/size]
In my searches on the internet, it seems that populating 2 tables in a dataset is as simple as:
[size=+0]dataAdapter1.fill(dataset1("table1")
dataAdapter1.newSelectCommandHere
dataAdapter1.fill(dataset1("table2")[/size]
But with the SQLHelper class, I don't seem to be able to specify which table to populate - my code is:
[size=+0]
Dim tables(1) As String
tables(0) = "table1"
tables(1) = "table2"
ds.Clear()
SqlHelper.FillDataset(SqlDbManager.GetConnectionString, CommandType.StoredProcedure, "StoredProcedure1", ds, tables, params)
[size=+0]SqlHelper.FillDataset(SqlDbManager.GetConnectionString,
CommandType.StoredProcedure, "StoredProcedure2", ds, tables, sqlPararameter1) [/size]
My "Table1" fills fine - but "Table2" is always empty.tables(0) = "table1"
tables(1) = "table2"
ds.Clear()
SqlHelper.FillDataset(SqlDbManager.GetConnectionString, CommandType.StoredProcedure, "StoredProcedure1", ds, tables, params)
[size=+0]SqlHelper.FillDataset(SqlDbManager.GetConnectionString,
CommandType.StoredProcedure, "StoredProcedure2", ds, tables, sqlPararameter1) [/size]
Any suggestions?
Thansk!
Amber
[/size]