CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Grid problem showing data from other table

Print topic Send  topic

Author Message
grivers

Posts: 28
Posted: 06/30/2006, 6:00 AM

I have a grid that shows data from table1. that table contains a user id number against every record. The user id and the real name of the person is stored in table2. I want to show the results from table 1 with the real name of the person where the user id is currently shown. How do I link the tables together to show the user name please?
View profile  Send private message
WKempees
Posted: 06/30/2006, 8:18 AM

In the grids properties.
DataSource, press the elipses to go to VQB (VisualQueryBuilder)
That will show you the current SQL for your grid.
Probably SELECT * from table1 WHERE .....
In the Table definition press add table, select table 2
Check the Realname field to be included in the SELECT
Draw a relationship between T1 and T2, Table2.user_id = Table1.user_id
Using the names that are appropriate in your situation.
Close VQB by pressing OK, or press View result to see what you have done.
Back in the Designer you can now place the Realname in the grid.
Walter

grivers

Posts: 28
Posted: 06/30/2006, 9:22 AM

Ah I was just missing the fact I had to place the realname label in the grid in design mode.

Thanks v much
View profile  Send private message
marcwolf


Posts: 361
Posted: 07/01/2006, 7:38 PM

Hi there grivers

Sometimes you might have an issue with this if you using an editable grid and you still want to to the same principle.

Your can use the onbeforeshowrow to get the values of the userid from a field and then display the name in a label using a ccdlookup

As label does not create any code in the database update sections its safe to use.

Hope this helps

Dave


_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.