Deleting Rows using DemandEntryAdapter.Delete()

I am looking at deleting rows using DemandEntryAdapter.Delete() mehtod. Here is what I have thus far. The keys seem to be working just fine. I'm not exactly sure why I am getting the error that I am getting. I believe I am telling it to delete the correct dr. Any ideas?



Private Sub btnDeleteSched_Click(ByVal Sender As Object, ByVal Args As System.EventArgs) Handles btnDeleteSched.Click
'// ** Place Event Handling Code Here **
Dim edvDemSched As EpiDataView = CType(oTrans.EpiDataViews("DemandSchedule"), EpiDataView)
Dim DemandEntryAdapt As DemandEntryAdapter = New DemandEntryAdapter(DemandEntryForm)

Dim keys As Object() = New Object(edvDemSched.dataView.Table.PrimaryKey.Length - 1) {}
Dim index As Integer = 0
Dim column As DataColumn

For Each column In edvDemSched.dataView.Table.PrimaryKey
keys(index) = edvDemSched.dataView.Item(edvDemSched.Row).Item(column.ColumnName)
index += 1

Dim dr as DataRow = DemandEntryAdapt.DemandEntryData.Tables.Item(edvDemSched.dataView.Table.TableName).Rows.Find(keys)


Catch exception As Exception
MessageBox.Show(keys(0) + "," + keys(1).ToString() + "," + keys(2).ToString() + "," + keys(3).ToString + "," + keys(4).ToString)
End Try
End Sub

And here is the error I'm getting...

Error Detail
Object reference not set to an instance of an object.

Stack Trace
at Epicor.Mfg.UI.Adapters.DemandEntryAdapter.Delete(DataRow dr)
at Script.btnDeleteSched_Click(Object Sender, EventArgs Args)