MondeoST24
Member
- Joined
- Mar 9, 2006
- Messages
- 16
- Programming Experience
- Beginner
I have a simple database app, tab 1 has a datagrid on which is filled simply with SELECT * FROM Customers into a dataset/datatable which is then bound to the grid.Then if I double click a row it moves to tab 2, looks up cell 1 on the selected row of the datagrid (which is the primary key) and then does "SELECT * FROM Customers WHERE ID=id" into a datareader.On tab 2 I have loads of text boxes and I simply dotxtname.text = rdr.item(0).tostringtxtcompany. text = rdr.item(1).tostringAnd so on.Could someone explain the correct and accepted way of doing this task, i.e. using object databinding etc. Should I create a customer class first with properties for my database fields? Then how to I do the binding etc.Thanks