Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Adding and retrieving data’s from two different tables


Adding and retrieving data’s from two different tables

Author
Message
shajilt
shajilt
Forum God
Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)Forum God (329 reputation)

Group: Forum Members
Posts: 1, Visits: 2

Hi There,

 

I am just a beginner with VB.NET; this is regarding a query about database join.

 

I have two tables in my database, one made as a master table and that we can call as ‘tbl_Master’ , the other one has got a grocery list in it and that we can call ‘tbl_groceries’.

 

For example,

A shopping cart program,.

 

Person A wants to buy some groceries, and I want create a record for Person A that he is buying groceries, like in the first column ‘Persons’ and second ‘Items’. So in first column will be adding Person A, and in the second one will be adding the ID’s of items for the other list tbl_groceries.

 

The same thing I want to retrieve to a DataGrid with detailed like “| Person A |Tea, Sugar, Coffee|”

 

So this is my concept, please can I have some hint how to make it happen,

 

Thank you,

Regards,

Shajil

How2Prog
How2Prog
Forum God
Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)Forum God (1.9K reputation)

Group: Forum Members
Posts: 5, Visits: 12
Hi shajilt !



Firstly, i'm sorry to tell you that your concept of database is wrong, you must create three tables, one for persons, the second for groceries, and the third is a table that contains all informations about Buying list.



so, begin by creating this tables, then you can retrieve data easily by simple join.



Good luck !

http://www.how2prog.com



How2Prog.Com Is a wonderful space to learn programming easily, includes many of the open source projects in many different programming languages (Visual Basic.Net, C#.Net, Java EE, ...)
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search