liquidspaces
Well-known member
Ok. So all of you have been very helpful thus far. Ive learned a lot. I owe each of you half of my paycheck. BUT I have one more problem in what has become a large series of problems.
Im trying to find and edit a specific record in a database. The table name is Shipping and the field is SHIP_FROM. The record number (which is the primary key) is stored in "lblBOLN.text". My code is below:
Dim objRow As DataRow
objRow = DataSet21.Tables("Shipping").Rows.Find(Val(lblBOLN.Text))
objRow.Item("SHIP_FROM") = txtName.Text
When I execute this, it gets hung up on the above line. I receive the following error:
"Object reference not set to an instance of an object."
Also, when I run the debugger, it shows that the value of objRow is "NOTHING".
If you could offer any help on this I would appreciate it. Maybe Rows.Find isnt doing what I think its doing.
Thanks,
Kevin
Im trying to find and edit a specific record in a database. The table name is Shipping and the field is SHIP_FROM. The record number (which is the primary key) is stored in "lblBOLN.text". My code is below:
Dim objRow As DataRow
objRow = DataSet21.Tables("Shipping").Rows.Find(Val(lblBOLN.Text))
objRow.Item("SHIP_FROM") = txtName.Text
When I execute this, it gets hung up on the above line. I receive the following error:
"Object reference not set to an instance of an object."
Also, when I run the debugger, it shows that the value of objRow is "NOTHING".
If you could offer any help on this I would appreciate it. Maybe Rows.Find isnt doing what I think its doing.
Thanks,
Kevin