Author Topic: Delete database records  (Read 890 times)

Jeff

  • Newbie
  • *
  • Posts: 11
Delete database records
« on: May 25, 2017, 01:21:50 pm »
Does anyone have a good example of deleting records by date from Microsoft SQL SERVER using ADO?
Jeff

JTaylor

  • Pundit
  • *****
  • Posts: 806
    • Data & Stuff Inc.
Re: Delete database records
« Reply #1 on: May 25, 2017, 01:49:34 pm »
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

  • Pundit
  • *****
  • Posts: 668
Re: Delete database records
« Reply #2 on: May 27, 2017, 02:02:16 pm »
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