| | |
Joining two tables in VB 6
![]() |
•
•
Join Date: Sep 2007
Posts: 4
Reputation:
Solved Threads: 0
hi to everyone,
Im creating an application which it can show all records of the two tables in single form. its like costumerTable and OrderList. how can i show a record of specific costumer from costumertable together with his product order details from OrderList table. Supposed I have costumerNo field from my costumertable and also i have costumerNo field in my Orderlist table. I also wants to show the order details in datagrid view supposed costumer bought 5 items. can anyone help me find solution. any help we'll be appreciated. thanks
Im creating an application which it can show all records of the two tables in single form. its like costumerTable and OrderList. how can i show a record of specific costumer from costumertable together with his product order details from OrderList table. Supposed I have costumerNo field from my costumertable and also i have costumerNo field in my Orderlist table. I also wants to show the order details in datagrid view supposed costumer bought 5 items. can anyone help me find solution. any help we'll be appreciated. thanks
•
•
Join Date: Jul 2007
Posts: 193
Reputation:
Solved Threads: 16
let's say you have variable costumernr with the costumer's nummer and variable amount
adodc1.recordsource = "Select * from tblorder where costumerno = " & costumernr
adodc1.refresh
amount = adodc1.recordcount 'gives you the amount of records with that costumer nummer
do while not adodc1.recordset.eof
'do whatever you want to do with the orders of that costumer nummer
loop
adodc1.recordsource = "Select * from tblorder where costumerno = " & costumernr
adodc1.refresh
amount = adodc1.recordcount 'gives you the amount of records with that costumer nummer
do while not adodc1.recordset.eof
'do whatever you want to do with the orders of that costumer nummer
loop
Join the 2 tables by use of the LEFT JOIN command in SQL.
PHP,Javascript and AJAX tutorials.
I am currently accepting CodeIgniter,JQuery,WordPress ,PSD->XHTML jobs.Contact Me.
I am currently accepting CodeIgniter,JQuery,WordPress ,PSD->XHTML jobs.Contact Me.
•
•
Join Date: Sep 2007
Posts: 4
Reputation:
Solved Threads: 0
lets say from Customer Table I have CustCode, CustName, CustAdd, CustTel. from my OrderList I have CustCode, PONum, ItemName, QTY, Amt.
I want to get all the records that my customer bought. e.i. customer bought 5 items. the other day he bought 10 items. how can i use sql to join two tables to be able to show the record which my customer bought (the 10 items). what should i do. is there any changes to my table structure for this..kindly post your suggestion please...
I want to get all the records that my customer bought. e.i. customer bought 5 items. the other day he bought 10 items. how can i use sql to join two tables to be able to show the record which my customer bought (the 10 items). what should i do. is there any changes to my table structure for this..kindly post your suggestion please...
•
•
Join Date: Sep 2007
Posts: 4
Reputation:
Solved Threads: 0
lets say from Customer Table I have CustCode, CustName, CustAdd, CustTel. from my OrderList I have CustCode, PONum, ItemName, QTY, Amt.
I want to get all the records that my customer bought. e.i. customer bought 5 items. the other day he bought 10 items. how can i use sql to join two tables to be able to show the record which my customer bought (the 10 items). what should i do. is there any changes to my table structure for this..kindly post your suggestion please...
I want to get all the records that my customer bought. e.i. customer bought 5 items. the other day he bought 10 items. how can i use sql to join two tables to be able to show the record which my customer bought (the 10 items). what should i do. is there any changes to my table structure for this..kindly post your suggestion please...
•
•
Join Date: Sep 2007
Posts: 8
Reputation:
Solved Threads: 0
•
•
•
•
hi to everyone,
Im creating an application which it can show all records of the two tables in single form. its like costumerTable and OrderList. how can i show a record of specific costumer from costumertable together with his product order details from OrderList table. Supposed I have costumerNo field from my costumertable and also i have costumerNo field in my Orderlist table. I also wants to show the order details in datagrid view supposed costumer bought 5 items. can anyone help me find solution. any help we'll be appreciated. thanks
this is the query:
"SELECT CustName, CustAdd, CustTel.,
PONum, ItemName, QTY, Amt.
FROM Customer
LEFT JOIN OrderList
USING (CustCode)
WHERE CustCode='*your input****' ";
Got it?
Hope it helps....
"SELECT CustName, CustAdd, CustTel.,
PONum, ItemName, QTY, Amt.
FROM Customer
LEFT JOIN OrderList
USING (CustCode)
WHERE CustCode='*your input****' ";
Got it?
Hope it helps....
PHP,Javascript and AJAX tutorials.
I am currently accepting CodeIgniter,JQuery,WordPress ,PSD->XHTML jobs.Contact Me.
I am currently accepting CodeIgniter,JQuery,WordPress ,PSD->XHTML jobs.Contact Me.
![]() |
Similar Threads
- Join multiple tables (VB.NET)
- Repeated Row In Record Sets (MS SQL)
- Joining 4 or more tables (MySQL)
- dataabse connectin string problem? (MySQL)
- ..joining 2 tables?=A tuf one....can U crack this ? (VB.NET)
- Need Help Joining 3 tables (MySQL)
- PHP newbie, project feasibility (PHP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: MS Access data retrieval problem
- Next Thread: from list view to label
Views: 4131 | Replies: 10
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 access activex add ado append application array banned basic bmp box calculator click client code coffeehouse college column connectionproblemusingvb6usingoledb convert copy creative database designer desktop dissertations dissertationthesis edit error excel filter flex form game header ide image implements inboxinvb installation installer interaction keypress listview machine macro mail match memory noob number open password pause pdf picture pos prime print program programmer prompt query random range range-objects readfile record registration remotesqlserverdatabase report reports retrieve save score search sites spectateswamp sql string struct subroutine table textbox time timer variable variables vb vb6 vb6.0 vba vista visual visualbasic web window windows






