Skip to content
Advertisement

How to edit and delete rows of a database using ASP?

I currently have a website that displays all the data within the database

But I want to create/edit and delete the database, I am aware of how to do this in EF but I am currently not aware in SQL, can someone help?

Advertisement

Answer

The following snippet is from SqlCommand.Parameters Property .

Updating

Deleting

For deleting the command could be as follows.

Inserting

For inserting the sql will be something like the following

and then

or

Please note that this is not ASP.NET specific. A console app could use this code as well.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement