Adds a column (if it does not already exist) to an existing SQL Server View (SQL Server Only)
Namespace:
DbNetLink.DataAssembly: DbNetLink.DbNetData (in DbNetLink.DbNetData.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
public void AddViewColumn( string ViewName, string ColumnExpression ) |
| Visual Basic (Declaration) |
|---|
Public Sub AddViewColumn ( _ ViewName As String, _ ColumnExpression As String _ ) |
| Visual C++ |
|---|
public: void AddViewColumn( String^ ViewName, String^ ColumnExpression ) |
Parameters
- ViewName
- Type: System..::.String
The name of the view
- ColumnExpression
- Type: System..::.String
The expression representing the column
Examples
DbNetData Db = new DbNetData( "DbNetTime" ); Db.Open(); Db.AddViewColumn("dbnettime_hours_view", "h.hourly_rate as hourly_rate"); Db.AddViewColumn("dbnettime_hours_view", "(h.hourly_rate * h.decimal_time) as hours_value"); Db.Close();