expression for a instantiation a DataColumnobject

  • Thread starter Thread starter Wolfram Hubert
  • Start date Start date
W

Wolfram Hubert

Hallo,

i not unterstand the expression {oColPk}, see Row 18. What do have the
braces with the instantiation a DataColumnobject?
1 Private Sub Test()
2 Dim oDsCustomer As DataSet
3 Dim oTblOrders As DataTable
4 Dim oColPk As DataColumn
5
6 'Eine Tabelle mit 3 Spalten im Arbeitsspeicher anlegen
7 oDsCustomer = New DataSet("CustomerOrders")
8
9 oTblOrders = New DataTable
10 oTblOrders = oDsCustomer.Tables.Add("Orders")
11
12 oColPk = New DataColumn
13
14 oColPk = oTblOrders.Columns.Add("OrderID",
Type.GetType("System.Int32"))
15 oTblOrders.Columns.Add("OrderQuantity", Type.GetType("System.Int32"))
16 oTblOrders.Columns.Add("CompanyName", Type.GetType("System.String"))
17
18 oTblOrders.PrimaryKey = New DataColumn() {oColPk} '<--- What is that?
19 end Sub
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Greetings

Wolfram Hubert
 
Back
Top