i am using vb2010 express. can u pls tell me wat is the code for delete?bcoz when im doing delete my database is not updating after i exit.i can add item in database but i cant delete it.any help?thanx guys? hope u understand my problem.

I'm not clear on whether your problem is with VB or SQL so I'll just give you the syntax for a SQL delete.

DELETE FROM tablename 
 WHERE condition

Let's say you have a table named Accounts and you want to delete the account for the person whose last name is "Flintstone" and first name is "Fred" (even though it's more likely you would delete by account number in case you have two people with the same name)

 WHERE LastName  = 'Flintstone'
   AND FirstName = 'Fred'

here is a screen shot.for example i want to delete the entire row.thanx for the help.

Attachments problem.jpg 93.69 KB

Same format with different column names. I don't know which column, or combination of columns you would need to narrow the delete down to just one record. Apparently your database does not have a primary key. I base this on the observation that you have a record with no values, and a primary key must have a value. Assuming IQAMA contains a unique value you would do

DELETE FROM yourtablename
 WHERE IQAMA = 1231231232

if IQAMA is a numeric field or

DELETE FROM yourtablename
 WHERE IQAMA = '1231231232'

is a string. Just replace yourtablename with the actual name of the table.

This question has already been answered. Start a new discussion instead.