|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
Just wanted to ask you how i can join two tables using VB code.I know how to do the SQL query but i dond't know how i can do it using VB. The database has 2 tables:Lessons(id, title, unitId) and Units(unitId, title). In a datacombo i have the titles of the units and i want to have a list of the lessons that belong to each unit (when i click a unit) put in a datalist. This implies a query that has a join between 2 tables. Could you please tell me how to do it? Many thanks ,Irina |
|
#2
|
|||
|
|||
|
I don't know which type of your db..But i can give a way to do it:U must create a new db,read a record of the unit table,and research the recordset of the lessons table to find the lessons record hasing some relation with unit record.After it,u can put the found lessons record and unit record into the new table..
OR U can create a relation table to connect 2 tables..some message about how to create relation db with vb:http://beta.experts-exchange.com/Pr...Q_20676686.html |
|
#3
|
|||
|
|||
|
Thank you for your reply.
It is a small Access db. I'll try the solution you gave me. Could you also please give me a another link of teh site where i don't have to pay the subscription? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Joining two tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|