Business objects and databases (An easy question ;-)


Author
Message
Ben Kim
Ben Kim
StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)StrataFrame User (207 reputation)
Group: Forum Members
Posts: 99, Visits: 253
New to StrataFrame.

We are generating objects using the DB deployment toolkit, Business object component class and the Business Object Mapper.

It appears what is generated for the DB name is our development database name.  When deployed is this overridden by what the user specifies as his/her database name?  Or do we need to write code to override?

Ben

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
At the moment this would require you to write some code to redirect the database to a different name...however, this is something that has been requested more than once (the ability to have a dynamic database name).
David Farrell-Garcia
David Farrell-Garcia
StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)
Group: Forum Members
Posts: 5, Visits: 62
In our application, we need to give the user the capabilty of creating additional databases so that they can manage several companies.  What would be the suggested steps for doing that?
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
The only thing that has to change is the connection string.  The database is not hard coded into the business objects.  So if you create another database, all that you need to take into account is your connection string...or more than likely, just the database portion of the connection string.

Here is an idea of what you could do after your standard connections have already been established:

       

Dim loConnection As New Data.SqlClient.SqlConnectionStringBuilder(MicroFour.StrataFrame.Data.DataBasics.DataSources(0).ConnectionString)

loConnection.DataSource = "MyNewDatabase"

MicroFour.StrataFrame.Data.DataBasics.DataSources(0).ConnectionString = loConnection.ToString()

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