944,111 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2855
  • VB.NET RSS
Aug 3rd, 2005
0

need help with tables

Expand Post »
I have a project where I have to make a sales and inventory system. My purchase order form has a table which you can list the products that you want to order. My question is how do I store the products information associated with the purchase order? I thought of doing a bruteforce by adding columns item1, item_desc1, item_qty1 then item2, item_desc2, item_qty2 and so on to the purchase order db table. any help would be appreciated. thank you!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
reyhan12 is offline Offline
18 posts
since Jul 2005
Aug 3rd, 2005
0

Re: need help with tables

a follow up
how do i make a listbox where each index corresponds to a db table. for example, i have a form with a datagrid on the right and a listbox on the left with 3 possible selections: po, si, products. when i click po, it will show me a list of all the po's on the datagrid, when i click si, it'll change to the si's list.

what i did was put 3 oleDBDataAdapter components, configured each to one table and generated a dataset with all 3 tables. then in the code, under the "Private Sub listActions_SelectedIndexChanged i put something like this:
If listActions.SelectedIndex = 0 Then
Me.OleDbDataAdapter2.Fill(Me.DataSet11)
Dim tableStyle As New DataGridTableStyle
tableStyle.MappingName = "PO"
Dim column As New DataGridTextBoxColumn
column.MappingName = "ponum"
column.HeaderText = "PO No."
column.Width = 40
tableStyle.GridColumnStyles.Add(column)
Me.DataGrid1.TableStyles.Add(tableStyle)
elseIf listActions.SelectedIndex = 1 Then
' Me.OleDbDataAdapter1.Fill(Me.DataSet11)
'Dim tableStyle2 As New DataGridTableStyle
' tableStyle2.MappingName = "SI"
' Dim column As New DataGridTextBoxColumn
' column.MappingName = "cname"
'column.HeaderText = "Customer"
'column.Width = 40
tableStyle2.GridColumnStyles.Add(column)
Me.DataGrid1.TableStyles.Add(tableStyle2)
and so on......
EndIf

it doesn't seem to work. i get an error at runtime, " The data grid table styles collection already contains a table style with the same mapping name." i think im approaching this the wrong way. anyways, thanks for the help!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
reyhan12 is offline Offline
18 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: thread pooling and synchronization
Next Thread in VB.NET Forum Timeline: Interactive excel web page and vb.net





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC