Dynamically connect to different databases


Author
Message
Michel Levy
Michel Levy
Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)Advanced StrataFrame User (607 reputation)
Group: StrataFrame Users
Posts: 193, Visits: 9K
Hi,

I'm a french absolute beginner in both StrataFrame and VB.Net (but 23 years with Clipper and Fox)...

Data are on several databases on SQL Server (DataBcuv1, DataBcuv2, ...) and global parameters are in ParaBcuv on the same Server. The most important of these is the correspondence between "folder" ID and database name (first folder may be linked to databcuv4, if my customer requires it).

In my main form, I launch (in its shown method) a form "choixdossier" as showdialog(), to chooses working folder (i.e. database), and I return a connect string in a property of my main form.

I use one BO for this first connection to parabcuv, and I need to dynamically re-set the connection strings of all BO to databcuv which are used in all forms in that application (all BO are in a BO library referenced in final application).
But method SetDataSources is in appmain.vb, not in my main form :-(

How can I do that?

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Sure I've missed something, but what?? and where??

This property is no longer used and was left in for backward compatability.  The data source is the ONLY thing that determines from where the data will be pulled at run-time.  Ths database property is generated using the name of the database from which you pulled the schema....but it ends there and is not actually used at run-time (or any other time for that matter) Smile

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