How to delete data from a 2005 SQL Express table...

I have a problem with deleting data from tables in SQL Express 2005.

I am new to Visual Studio 2008 and Visual Basic 2008 data access, and am trying to write some code to learn about them.

The problem that I have is that I have added 2 records to a table and cannot seem to delete either record from the Visual Studio 2008 interface to the table data.

I have uploaded a video to so that you can see exactly what my problem is.

Any help would be greatly appreciated.
Who is Participating?
Carlos VillegasFull Stack .NET DeveloperCommented:
Hi cerksees, I saw your video (nice), you will need to add a primary key column to your Dates table, for example, add a column named DateId, type Int, and mark it as Primary Key, then in your column properties, set this column has an identity column, save the table, that will fix your problem.
Here a screen shot:
I think that you are stuck on that because VS designer is not letting you to delete that records, If you want to delete all the data in your table just execute this command by using the SQL Server Management Studio Express:

Open in new window

This is a way to fix your problem, but you need to analyze your data, maybe you dont need add an extra column, maybe you can mark the Date column as a primary key and you are done.

Sorry if I dont understand fully your explanation, english is not my first language.
Can you show us the code you are using to delete rows?
cerkseesAuthor Commented:
Excellent.  BTW, anyone that needs this can get the Microsoft SQL Server Management Studio Express for Sql Express 2005 from

Be sure and run it from a command line with the command window run as an administrator.  If you don't it may not install correctly.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.