Transaction Support For DeleteByPrimaryKey


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I need to execute DeleteByPrimaryKey as part of a transaction.

I've seen that Overload method does not exist.

What should I do ? If I use QueryInformation class for delete ,How can I execute this instance of QueryInformation. ?

We know that FillDataTable gets QueryInformation as parameter for fill queries. But What about Delete,update,Insert Queries ?

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
You will not want to use the DeleteByPrimaryKey command but rather the DeleteCurrentRow command.  Then when you save on the transaction this record will be deleted on the transaction.  The transaction is started at the point of the Save(), so if you call the DeleteByPrimaryKey it will just delete the record from the server outside of the transaction.
Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I want to use DeleteByPrimaryKey method. But I need to run that method as part of a transaction.

As I understand, It is not used this way. If I call this method between TransactionBegin and TransactionCommit statements, It is executed outside the transaction.

Ertan Deniz
Ertan Deniz
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 163, Visits: 493
DeleteCurrentRow() is executed by internally with two parameters having true values. (CheckSecurity,OnlyMarkAsDeleted)

In this case, there is a conflict with documentation. DeleteCurrentRow(true,true) will mark the current record as deleted.

From StrataFrame Documentation

"DeleteCurrentRow()
When this overload is called, the record being deleted is immediately removed from the server and the internal data table is updated."

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
There is no conflict with the documentation.  If you call the DeleteCurrentRow with a False, then it is immediately removed from the server.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search