>> Question: If we don't have the specific ItemID to delete, what would happen?
Why would you issue a delete against the table if you didn't have the ID of the row? Issuing a DELETE statement that does not remove any rows does not generate any errors from SQL.
>> And how do we know, if the record was deleted or we didn't have this record to start from?
Eric gave you the technical information. My questions is why would you want to know? If the row's not there, how do you have the ID to delete it with? If you're worried about concurrency, using the DELETE is a very expensive to find out - from a locking point of view. If you're really worried about it, you could do something like:
IF EXISTS (SELECT * FROM cartDetail WHERE itemID = @id)
DELETE FROM cartDetail WHERE itemID = @id
-Mike
>Hi everybody,
>
>strSql='delete from CartDetail where ItemID = '+cStr(intItemID)
>set conn = Server.CreateObject("ADODB.Connection")
>conn.open "connection string"
>conn.execute sql, , &H00000080
>
>Question: If we don't have the specific ItemID to delete, what would happen? And how do we know, if the record was deleted or we didn't have this record to start from?
>
>Thanks in advance.