Dynamic DataSourceKey?


Author
Message
dgsoft
dgsoft
StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)StrataFrame User (141 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

I want on fly in my application switch between databases, each of them has own DataSourceKey.



My problem is - If I not write the DataSourceKey hardcoded for BO component, I have an error like DataSourceKey is empty...

The question is - how can I make dynamic datasourcekey and also.. question.. can businessobjectmapper as default take my subclass of businesslayer, where I can add additional standard functionality for my projects.



For this purpose I thought to do





Public Class PSOFormStore_PensBO

Inherits MicroFour.StrataFrame.Business.BusinessLayer



#Region " Data Retrieval Methods "



Overloads ReadOnly Property DataSourceKey() As String

Get

Return(DatabaseManager.GetCurrentDataSourceKey())

End Get

End Property

#End Region

End Class



Public Class DatabaseManager

Public Shared Function GetCurrentDataSourceKey() as String

Return("TEST")

End Func

End Class


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