Is there a way to update more than one Database having same schema using single ObjectDataSource in C#???
i.e Just by providing more than one connection string is it some how possible to update more than one Database? I need to update/insert same record in multiple Database with same schema using ObjectDataSource in C#.
Yes you can do it, since with an ObjectDataSource YOU ae the one writing the code that does the insert. Inside your ‘Update’ and ‘Delete’ methods you can simply perform two database actions, one for each database that you are working with. You can abstract this out to an operation that could be passed a connection to ensure that you don’t have duplicate code sitting everywhere.
NOTE
You CANNOT do this thought via a single connection, you must do two fully separate database actions.
Example
Per the comment there was a request for more detail.
Basically inside each of your methods, simply do two db calls, a crude AND NOT properly formed example to show the concept is below, for a ‘delete’ method.
Obviously the usage of a stored procedure, as well as proper using statements or try/catch is needed, but this gets the idea across.