ExecuteNonQuery() and Transactions


Author
Message
choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Hi Folks

Will the below ExecuteNonQuery run as part of the transaction?

TransactionBegin("", Data.IsolationLevel.RepeatableRead)

ExecuteNonQuery(c)

Something.Save(True)

TransactionCommit("")


StrataFrame Team
S
StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Um, no, it won't, there isn't a wrapper method on the BO for that... It needs to be added.

In the meantime, you can do so through the DbDataSourceItem directly.  So, in the BO:

DbCommand c = SomeCommand
DataBasics.DataSources("key").ExecuteNonQuery(c, True, "TranKey")

choyt
choyt
StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)StrataFrame Novice (100 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Works for me! Thanks!
StrataFrame Team
S
StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Good to hear.  Also, if you need access to the raw SqlTransaction object, you can access it through the Transactions property on the SqlDataSourceItem.  Just give it the key, and it will return the SqlTransaction object; just in case you need to do anything with it.
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