ForeignKeyColumnCollection.Add ForeignKeyColumnCollection.Add Method

Definition

Adds a ForeignKeyColumn object to the foreign key column collection.

Overloads

Add(ForeignKeyColumn) Add(ForeignKeyColumn)

Adds a ForeignKeyColumn object to the foreign key column collection.

Add(ForeignKeyColumn, Int32) Add(ForeignKeyColumn, Int32)

Adds a ForeignKeyColumn object at a specified index position in the foreign key column collection.

Add(ForeignKeyColumn, String) Add(ForeignKeyColumn, String)

Adds a ForeignKeyColumn object to the position after a specified, existing ForeignKeyColumn object in the foreign key column collection.

Add(ForeignKeyColumn) Add(ForeignKeyColumn)

Adds a ForeignKeyColumn object to the foreign key column collection.

public:
 void Add(Microsoft::SqlServer::Management::Smo::ForeignKeyColumn ^ foreignKeyColumn);
public void Add (Microsoft.SqlServer.Management.Smo.ForeignKeyColumn foreignKeyColumn);
Parameters
foreignKeyColumn
ForeignKeyColumn ForeignKeyColumn

A ForeignKeyColumn object value that is to be added into the foreign key column collection.

Examples

Using Collections

Add(ForeignKeyColumn, Int32) Add(ForeignKeyColumn, Int32)

Adds a ForeignKeyColumn object at a specified index position in the foreign key column collection.

public:
 void Add(Microsoft::SqlServer::Management::Smo::ForeignKeyColumn ^ foreignKeyColumn, int insertAtPosition);
public void Add (Microsoft.SqlServer.Management.Smo.ForeignKeyColumn foreignKeyColumn, int insertAtPosition);
Parameters
foreignKeyColumn
ForeignKeyColumn ForeignKeyColumn

A ForeignKeyColumn object value that is to be added into the foreign key column collection.

insertAtPosition
Int32 Int32

An Int32 value that specifies the index position of the foreign key column collection.

Examples

Using Collections

Add(ForeignKeyColumn, String) Add(ForeignKeyColumn, String)

Adds a ForeignKeyColumn object to the position after a specified, existing ForeignKeyColumn object in the foreign key column collection.

public:
 void Add(Microsoft::SqlServer::Management::Smo::ForeignKeyColumn ^ foreignKeyColumn, System::String ^ insertAtColumnName);
public void Add (Microsoft.SqlServer.Management.Smo.ForeignKeyColumn foreignKeyColumn, string insertAtColumnName);
Parameters
foreignKeyColumn
ForeignKeyColumn ForeignKeyColumn

A ForeignKeyColumn object value that is to be added into the foreign key column collection.

insertAtColumnName
String String

A String value that specifies the name of the existing ForeignKeyColumn object in the collection after which to insert the new ForeignKeyColumn object.

Examples

Using Collections

Applies to