BO To Connect To Tables in Different Databases


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No problem Smile
Jeff Pagley
Jeff Pagley
StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Thanks for the info Trent!
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You will want to create multiple data sources and then tie your BOs DataSOurceKey property to the correct connection.  This can be done programmatically at run-time as well.  First setup your data sources:

DataBasics.DataSources(New SqlDataSourceItem("","My SqlConnection;Database=ApplicationSpecific;"))
DataBasics.DataSources(New SqlDataSourceItem("MASTER","My SqlConnection;Database=Master;"))

Next, on the BO you will want to assign the the DataSourceKey to any BO that needs to talk with the MASTER instead of the default ("" - Empty String By Default) connection.  You can set this on the property sheet of the BO or set it in code:

MyBO.DataSourceKey = "MASTER"

Jeff Pagley
Jeff Pagley
StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)StrataFrame User (469 reputation)
Group: StrataFrame Users
Posts: 223, Visits: 893
Hi StrataFrame Team,

I have multiple databases running on a single SQL Server 2005 machine.  I need to have a master database with master tables that all other databases/applications use.  How do I setup my BO connections so that within the project/application which is using tables from one database I can access the master tables residing in the master database?

Thanks,

jjp

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