I gave you all the possible answers. I don't think there can be any. Put a
breakpoint, debug and add a watch to each of these cases and an answer ye
shall find.
My gut is that the Find() returns nothing...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"JackO" <Ja***@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
I have created the dataset DsUsers1 and dropped it on my Web Form. I have
made sure that the data exists by generating a data list from the data
adapter SqlDataAdapter1 which is also on my Web form. I created the
"UserAuth" table myself and I am able to add records through the ASP.NET
codebehind function I wrote. Any insight into why I am getting this error
when I try and delete a record would be appreciated.
"Karl Seguin" wrote:
DsUsers1 could be null
a table named "UserAuth" might not exist.
No rows might be found
SqlDataAdapter1 might not exist
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"JackO" <Ja***@discussions.microsoft.com> wrote in message
news:15**********************************@microsof t.com... >I am getting the following error:
>
> Exception Details: System.NullReferenceException: Object reference not
> set
> to an instance of an object.
>
> Source Error:
>
>
> Line 192:
> Line 193: Private Sub btnDeleteUser_Click(ByVal sender As
> System.Object,
> ByVal e As System.EventArgs) Handles btnDeleteUser.Click
> Line 194:
> DsUsers1.Tables("UserAuth").Rows.Find(ddlUsers.Sel ectedItem.Value).Delete()
> Line 195: SqlDataAdapter1.Update(DsUsers1, "UserAuth")
> Line 196: End Sub
>
> I have stepped through the code and determined that there is not a null
> value in the drop down list. Any help would be appreciated.