StrataFrame Forum

Database Schema Support in SF....?

http://forum.strataframe.net/Topic17247.aspx

By Edhy Rijo - 6/23/2008

Hi Trent,

I am starting a new project and I am planning on using SQL2005 Database Schemas to better organize the model.  Is there any problem in SF to support multiple schemas other than the default dbo? 

Also how will using Schemas affect my working code with the BOs in SF?  So far using the default dbo when creating an scalar method, I simply refer to the BO.TableName in the SQL, would I need to alter this to include the schema or will this be included in the BO.TableName property?

By Trent L. Taylor - 6/23/2008

Is there any problem in SF to support multiple schemas other than the default dbo? 

Nope.  Doing it as we speak.  I did make a change to the DDT the other day as there was a bug if you had the same table name but different schemas, but this will be addressed in the beta build I post later on today or tomorrow.

Also how will using Schemas affect my working code with the BOs in SF? 

dbo is always the default schema.  So if you have queries that use something other than dbo, SQL Server will require you to supply them.  But in regards to the BOs and the framework, there is no difference.  The schema name is part of the BO when mapped, so any intrinsic methods (i.e. FillByPrimaryKey) methods will already take this into account.

So far using the default dbo when creating an scalar method, I simply refer to the BO.TableName in the SQL, would I need to alter this to include the schema or will this be included in the BO.TableName property?

You will need to include the schema:

Dim fullName as String = MyBO.TableSchema & "." & MyBO.TableName
By Edhy Rijo - 6/23/2008

Thanks!