Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I currently work on a project. My project is to manage the inventory of a small business. I currently have a database with SQL server 2014. My database contains several tables including 5 table that is : "Inventory", "Product", "Location", Department", "Provider".

I am currently using the offline method ado.net. (I can't use linq :( )

So yeah, I need to select certain field of 5 tables listed above and bind to a datagridview.

For example, i want to take code,description,tax,price from product. Quantity, company from inventory. Description from location. DepartmentCode from department. providerCode from provider and bind all that field into 1 datagridview.

Im currently using a "strongly typed dataset" that contain my entire database.


If you need more information, just ask it !

Thanks guys!

ps: currently new with the database so be nice! ;)

pps: Sorry for my english, this is not my first language!

What I have tried:

I did several research before ask a question here, some people say to take all the information and deposit in a datatable. Is it the good way? Is he a better method to do? Maybe i can use stored procedure?
Posted
Updated 6-Nov-16 7:33am

1 solution

You need to create a join on the tables to return a single dataset.

See Joins.[^]

There are many tutorial on the internet on how to do these. just search TSQL Joins

Also you could create a database view that has all your joins you need and then select the views.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900