Adding a Datarow

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vayse

    #1

    Adding a Datarow

    As soon as I try to set rowFixtures.Hom eTeamID I get an error:
    "Object reference not set to an instance of an object."
    What should I changes?

    Dim rowFixtures As HTPlannerDataSe t.LeagueFixture sRow
    rowFixtures.Hom eTeamID = "123"
    rowFixtures.Hom eTeamName = "Team A"
    rowFixtures.Awa yTeamID = "456"
    rowFixtures.Awa yTeamName = "Team B"
    Me.HTPlannerDat aSet.LeagueFixt ures.AddLeagueF ixturesRow(rowF ixtures)


  • Cor Ligthert [MVP]

    #2
    Re: Adding a Datarow

    Vayse,

    You cannot create a datarow when you don't have the columnsdescript ions
    which are in the datatable.

    So probably it will be something as
    [color=blue]
    > Dim rowFixtures As PlannerDataSet. LeagueFixturesR ow[/color]
    RowFixtures = HTPPlannerDatas et.LeagueFixtur esTable.NewRow
    [color=blue]
    > rowFixtures.Hom eTeamID = "123"
    > rowFixtures.Hom eTeamName = "Team A"
    > rowFixtures.Awa yTeamID = "456"
    > rowFixtures.Awa yTeamName = "Team B"
    > Me.HTPlannerDat aSet.LeagueFixt ures.AddLeagueF ixturesRow(rowF ixtures)
    >
    >[/color]
    I hope this helps,

    Cor


    Comment

    Working...