General information
Category:
The Mere Mortals .NET Framework
Title:
Can't run query from inside a transaction?
I need to test the uniqueness of 2 fields in combination. My approach is to compose a "SELECT COUNT(*) ..." query with the two values passed as parameters. I then execute this from the business object with:
Result = (Me.ExecScalar(Sql, SqlParms) = 0)
This has been working fine until I set Me.AutoUseTransactions = True in the business object which is the parent of this object. Now when I try to add a new row I get an exception:
"The transaction object is not associated with the connection object. "
Shouldn't I be able to run a scalar query during the save transaction? What's up with this?
Thanks,
Max...
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only