Transaction Support For DeleteByPrimaryKey
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Transaction Support For DeleteByPrimaryKeyExpand / Collapse
Author
Message
Posted 04/11/2008 3:43:19 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:35:22 AM
Posts: 115, Visits: 343
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 ?

Post #15519
Posted 04/11/2008 8:35:00 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
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.
Post #15530
Posted 04/11/2008 8:51:56 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:35:22 AM
Posts: 115, Visits: 343
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.

Post #15535
Posted 04/15/2008 7:57:44 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:35:22 AM
Posts: 115, Visits: 343
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."

Post #15626
Posted 04/15/2008 9:36:21 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
There is no conflict with the documentation.  If you call the DeleteCurrentRow with a False, then it is immediately removed from the server.
Post #15629
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:52pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.