Jump to content
Xtreme .Net Talk

spaced

Members
  • Posts

    2
  • Joined

  • Last visited

Personal Information

  • Occupation
    Web Programmer
  • Visual Studio .NET Version
    Visual Studio.NET Enterprise
  • .NET Preferred Language
    Visual Basic.NET

spaced's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Dim adptContactList As SqlDataAdapter Dim dsContacts As DataSet1 Public dsDepartment As DataSet2 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dsContacts = Cache("DataSet1") dsDepartment = Cache("DataSet2") adptContactList = Cache("adptContactList") If Not IsPostBack Then SqlDataAdapter1.Fill(DepartmentNames) txtDept.DataBind() End If End Sub I'm not sure if this is what you're looking for as I'm somewhat new to this stuff. Oh, and I'm basing this code off of material covered in the MCAD/MCSD Self-Paced Training Kit series for Developing Web Applications with VB.NET and C#.NET.
  2. Line 220: ' Create a new row object for the Contacts table Line 221: Dim rNew As DataSet1.ContactListRow Line 222: rNew = dsContacts.ContactList.NewContactListRow Line 223: ' Add data to the row Line 224: rNew.ContactID = GetNewID(dsContacts.Tables("ContactList")) I'm attempting to add a new row of data (contact information) into a dataset (and then into a sql server table itself). But I get a line error on 222 stating that the object reference isn't set to an instance of an object. It seems like it was declared in the line above, but isn't working for some reason. Any suggestions? Thanks in advance, spaced
×
×
  • Create New...