computed column, how to do?


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,

  1. I need a computed column in a SQL server table. Is it possible to define it from within DDT?
  2. When I create it in SQLServer Management Studio, and import the database in DDT, I can't see that it is a computed column.


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: 6.9K
If it is impossible today, I know that custom property on the BO is a workaround, but how could I use DDT on an imported SQL database where already exist these computed columns?




I am not understanding your question here. The DDT will not recognize a computed column (as there is no need) since it not necessary to distribute this column. This type of logic is generally used within a SPROC or VIEW. In the case of a view, the DD can only interpret a result set (which we use SMO to give us the columns). So if the column cannot be interpreted as a distributable column, then it will not appear within the DDT as such. Thus, you would have to create a custom property as previously mentioned in order to directly access it as a strong-typed property. If you have no need to binding to this column, then you could just reference the value through the CurrentRow["FieldName"] property of the BO.
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