Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 22nd, 2003, 03:04 AM
toniri4 toniri4 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 2 toniri4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Joining two tables

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

Reply With Quote
  #2  
Old November 22nd, 2003, 11:22 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
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

Reply With Quote
  #3  
Old November 22nd, 2003, 11:42 PM
toniri4 toniri4 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 2 toniri4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Joining two tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway