Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete record from the table
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00752409
Message ID:
00752545
Views:
15
This message has been marked as the solution to the initial question of the thread.
>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?


You can pass another parameter into the execute method of a ado recordset that, upon completion, will contain the number of rows affected.


For a non–row-returning command string:
connection.Execute CommandText, RecordsAffected, Options

For a row-returning command string:
Set recordset = connection.Execute (CommandText, RecordsAffected, Options)

RecordsAffected
Optional. A Long variable to which the provider returns the number of records that the operation affected.


See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthcnnexecute.asp for more info.

Just a personal note, I never used this optional parameter, so Im not exectly sure how it works.
Previous
Reply
Map
View

Click here to load this message in the networking platform