Archived Boards > COM Automation and dotNet

Delete database records

(1/1)

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

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

Navigation

[0] Message Index

Go to full version