I have a named query that takes the database as a parameter (lets say i pass databaseA). If I begin a transaction on databaseB and pass that to the system.db.runNamedQuery function, does it ignore the tx or does that override the database parameter?
This, of course, assumes databaseA and databaseB are two distinct servers.
Transactions 'win', ultimately, on the backend; it doesn't matter what you specify in the individual call if you also specified a transaction ID. It's possible frontend validation exists in some scope/depending on exactly which function you're calling to tell you that you're doing something silly, but I couldn't say for sure.
Just for the sake of it, I'll also explicitly state - a transaction cannot run on multiple databases, no matter what you do. By definition a transaction is only transactional across one database.
Ok, that is what I thought. Thanks!