Delete database records

Started by Jeff, May 25, 2017, 01:21:50 PM

Previous topic - Next topic

Jeff

Does anyone have a good example of deleting records by date from Microsoft SQL SERVER using ADO?
Jeff

JTaylor

Plenty of ADO examples in the Tech Database.  Once you have your connection one easy way is...

SQLText = "Delete from table where ...."
myDBConn.Execute(SQLText)

Jim

stanl

While Jim's suggestion is straightforward and should work, you may experience difficulties. In which case

  • Which version of SQL Server are you using
  • What cursor options in your connection string are you using

will be helpful