Executenonquery

  • Thread starter Thread starter Tony
  • Start date Start date
If you're executing a SP, you can setup and trap the RETURN value parameter.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Sorry for being so dense on this but i can't find any way to do this.
There is no UpDateRec.Item.count or anything like that, that i can find?


SQL = "DELETE from EMail WHERE ID = " & GetID
cnString = New OleDbConnection("Provider=MicroSoft.Jet.OLEDB.4.0; Data
source= C:\MyData.mdb")
Dim UpDateRec As New OleDbCommand(SQL, cnString)
UpDateRec.Connection.Open()
UpDateRec.ExecuteNonQuery()

(i need something here to check records effected)


cnString.Close()
 
Tony,

ExecuteNonQuery returns an int which is number of records affected.
Dim recAffected as integer = UpDateRec.ExecuteNonQuery()
 
Back
Top