Switch data source during runtime


Author
Message
Chan
Chan
Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Is it possible to switch data source (SQL Server -> Oracle / SQL Server -> VFP) during runtime? How?

Thank you

Chan
Chan
Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Any update?

StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, you can swap data sources at runtime.  You just need to call MicroFour.StrataFrame.DataBasics.DataSources.Remove("key") and then add a new data source to the collection with the same key, but of a different type (say, OracleDataSourceItem instead of VfpDataSourceItem).  You'll just need to make sure that if a business object talks to both, that all of the data types match up.

You also might need to change the config on your business objects some: say if the Oracle needs the sequence name for primary key insertion.

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