-
Jan 10th, 2018, 04:35 PM
#1
Thread Starter
New Member
Redesign of Access DB to VB.Net - Brain Fry
I have pretty much been thrown into this position and have very little programming knowledge. This company has several MS Access DB's that do everything from Purchasing to Tracking to Scanning Bar Codes.....
I been given the task to tackle updating it to VB.net. Please bear with me as I don't know the lingo and hardly know what I am doing.
They want me to start with the Purchase Order. There are text boxes on the top of the form and a data table at the bottom, (all of which can be used as data entry or just searched to view data). The text boxes at the top are the PO #, Supplier Information, Address, Phone etc. The data table at the bottom lists the multiple items on the purchase order.
I am having trouble with the text boxes on the top. Would those need to be bound individually to a separate data source or can I use the grid-view columns from the adapter I have already made?
I have made an adapter with sql query in it which is bound to the grid-view for the multiple items on the purchase order and it works ok. I enter the PO# in the textbox and it fills the grid with the data.
The query in the data-grid retrieves the multiple lines purchased on the purchase order, but I am having trouble getting the data into the text-boxes on the top with the supplier information.
I don't know if this makes any sense, but if it does can you please point me in the right direction of where to find more information on this?
Thanks way in advance.
Brook
-
Jan 10th, 2018, 05:54 PM
#2
Re: Redesign of Access DB to VB.Net - Brain Fry
Here is an article that goes into details about data binding in VB.Net.
Here is another from a Microsoft source.
-
Jan 11th, 2018, 09:10 AM
#3
Re: Redesign of Access DB to VB.Net - Brain Fry
Sounds to me like a master detail relationship where purchase orders is the master table (DataTable) and suppliers are details. So in the master table you would have a primary key (auto-incrementing) that in the child table is a foreign key. Placing both tables into a DataSet and then set relations between the two tables off of the DataSet then bind the tables with two BindingSource components. TextBox controls can be bound to the BindingSource components e.g. SomeTextBox.DataBinding.Add.
Take time to learn the above and how to write the above in a class.
Here is a pattern to follow (and there are other ways to implement, this is simply one way to do this).
https://code.msdn.microsoft.com/Basi...1a5c3d?redir=0
An example for binding controls
https://code.msdn.microsoft.com/Simp...89af20?redir=0
-
Jan 11th, 2018, 09:11 AM
#4
Thread Starter
New Member
Re: Redesign of Access DB to VB.Net - Brain Fry
Thank you I will look into those this morning.
-
Jan 11th, 2018, 09:13 AM
#5
Thread Starter
New Member
Re: Redesign of Access DB to VB.Net - Brain Fry
Thank you for responding, I will look at the information and give it another go!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|