Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

displaying data on dbgrid...interesting but tough

Posted on 1998-04-01
1
Medium Priority
?
185 Views
Last Modified: 2012-05-04
how do i display data from two tables in my database in a dbgrid?
codes pls
0
Comment
Question by:icesurfer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
VBert earned 100 total points
ID: 1460154
Add a dbgrid and a data control to your form. Set the dbgrid's .DataMode property to BOUND and it's .DataSource property to DATA1 (the name of your data control.)

Set the Data1.Database to the name of your database, and the Data1.Recordsource to an sql statement that does a join of the two tables you want.

For example, if you have a table of book authors and a table of
book titles, the common field between the two table being author, your sql statement would look something like this...

"SELECT * FROM AUTHORS, TITLES WHERE TITLES.AUTHOR_NAME = AUTHOR.NAME"

When you refresh your data control, the results should show up in your grid.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question