Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp update and delete sql statement

Status
Not open for further replies.

Tech718

Technical User
Joined
Jan 24, 2008
Messages
13
Hi,
i have a user site and i am trying to make users able to update and delete their posts but i have the same issue with both. Whenever i update or delete it happens to all their postings instead of just one of their postings.
I want all their postings to show up but for them to be able to select the ones they want to update or delete from the results. Help me please!

For the update i tried
UPDATE "table"
SET column1 = [column1], column2 = [column2]
WHERE UID = '::uid::'

and for the delete DELETE FROM table
WHERE UID = '::uid::'

 
You should have a Primary Key in your table.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
that's because you're only criteria is the userid...when you run the query it finds all the records that meet that criteria (all the user's postings) and does what you've told it to do (update or delete)...how can you identify the EXACT record you want to update or delete?

Leslie

In an open world there's no need for windows and gates
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top