another delete prob.

  • Thread starter Thread starter Marc Miller
  • Start date Start date
M

Marc Miller

I've read other posts concerning unsuccessful deletes, but I can't find
anything that tells me what is wrong
with my code. After I delete() the row in the dataset, the dataset is empty
and I get 0 as the value for
my 'isDel' variable. What am I doing that I shouldn't be doing, or
vice-a-versa?

Thanks for any help,
Marc Miller

Dim sr As New StringReader(CStr(viewstate("dsbldgdata1")))

DsBldgData1.ReadXml(sr)

..DsBldgData1.Tables("Profile").Rows(0).Delete()

SqlConnection1.Open()


Dim iDel As Integer

Try

iDel = SqlDataAdapter1.Update(.DsBldgData1, "Profile")

Catch ex As Exception

errWindowShow(ex.message)

Finally

SqlConnection1.Close()

End Try
 
isDel or iDel ?

You could also check if SET NOCOUNT is ON (assuming this is how the
framework read back the number of processed rows).

Patrice
 
Patrice,

NOCOUNT is set to OFF. However, no rows get deleted either way.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top