ashrobo
Well-known member
howdy,
is it possible to create an auto-increment column in the datatable without getting the value from the database? i know it is possible to do so if the value is taken from the database but in my situation right now, i have retrieved the info i need from the database into the datatable. However, there is no relevant auto-increment column in the database and i want to include an auto number column in the datatable.
a datagrid is bound to the datatable..
the auto-increment column is for displaying the row number in the datagrid.
thanks in advance,
ashrobo
is it possible to create an auto-increment column in the datatable without getting the value from the database? i know it is possible to do so if the value is taken from the database but in my situation right now, i have retrieved the info i need from the database into the datatable. However, there is no relevant auto-increment column in the database and i want to include an auto number column in the datatable.
Code:
query = "SELECT POQty.PONo AS [PO No], InvOrders.PartNo AS [Part No], " & _
"POQty.Quantity AS [Quantity] " & _
"FROM POQty INNER JOIN InvOrders ON POQty.InvoiceNo = InvOrders.InvoiceNo " & _
"WHERE POQty.InvoiceNo = " & InvNo & ""
Try
daOrders.SelectCommand = New OleDbCommand(query, MyConnection)
daOrders.Fill(dsOrders)
Catch ex As Exception
MsgBox(ex.Message)
End Try
a datagrid is bound to the datatable..
Code:
grdOrders.DataSource = dsOrders.Tables(0)
thanks in advance,
ashrobo