|
-
Sep 16th, 2002, 10:10 AM
#1
Thread Starter
Junior Member
Object reference not set to an instance of an object.
Can anyone help - I am trying to add a record (with no success!) The following code comes up with the error message Object reference not set to an instance of an object.at the line marked (***). Must be a simple reason but I can't work it out...
Cheers
John
Private Sub btnAddUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddUser.Click
OleDbDataAdapter1.Fill(DsAllProfile1, "tblProfile")
Dim objTable As DataTable
Dim drRows As DataRowCollection
Dim objNewRow As DataRow
objTable = DsAllProfile1.Tables("tblProfile")
drRows = objTable.Rows
(***)objNewRow("Default") = CBool("1")
objNewRow("ProfileWeight") = 233
objNewRow("ProfileName") = "Pablo"
objNewRow("ProfileDOB") = "23/02/71)"
objNewRow("ProfileSex") = CBool("1")
drRows.Add(objNewRow)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|