I am trying to create a dataset using data from multiple tables. however, it does not seem to let me move on to this second table. Here is the code i currently have. Can anyone offer me help as to what direction I should go in to fix my problems?
Code:Sub Page_Load(sender As Object, e As EventArgs) dim DtaSetTransfers As Dataset dim accounttransfers As SqlDataAdapter DtaSetTransfers = New DataSet() dim conn as New SQLConnection(connstr) conn.Open() accounttransfers = New SqlDataAdapter ("Select AccountName From Accounts",conn) accounttransfers.Fill (DtaSettransfers, "AccountName") accounttransfers.SelectCommand = New SqlCommand ("Select TerritoryName From Territories",conn) accounttransfers.Fill (DtaSettransfers, "TerritoryName") transfers.DataSource = DtaSettransfers transfers.DataBind() conn.Close() ------------------ Heres my datagride----------------- <asp:DataGrid id="transfers" runat="server"> <HeaderStyle font-bold="True"></HeaderStyle> </asp:DataGrid>


Reply With Quote
Bookmarks