.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

DataAdapters

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :ASP.Net
 

I have a dataset with about 10 tables and one adapter.  Sofar I can populate the dataset just fine using the following approach I found on the internet (where the sqlGet strings have been previously set):

My adapter

Try
            con.Open()

            cmd = New SqlCommand(sqlGetMatchData, con)
            adapter.SelectCommand = cmd
            adapter.Fill(ds, "Match")

            adapter.SelectCommand.CommandText = sqlGetHomeTeamData
            adapter.Fill(ds, "HomeTeam")

            adapter.SelectCommand.CommandText = sqlGetAwayTeamData
            adapter.Fill(ds, "AwayTeam")

            adapter.SelectCommand.CommandText = sqlGetHomePlayers8
            adapter.Fill(ds, "HomePlayers8")

            adapter.SelectCommand.CommandText = sqlGetHomePlayers9
            adapter.Fill(ds, "HomePlayers9")

            adapter.SelectCommand.CommandText = sqlGetAwayPlayers8
            adapter.Fill(ds, "AwayPlayers8")

            adapter.SelectCommand.CommandText = sqlGetAwayPlayers9
            adapter.Fill(ds, "AwayPlayers9")

            adapter.SelectCommand.CommandText = sqlGetGroups
            adapter.Fill(ds, "Groups")

            adapter.SelectCommand.CommandText = sqlGetSets8
            adapter.Fill(ds, "Sets


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend