expression for a instantiation a DataColumnobject

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top