Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > how to assign a ddbb value to a label using two tables

Reply
Thread Tools

how to assign a ddbb value to a label using two tables

 
 
rcast rcast is offline
Junior Member
Join Date: Jun 2012
Posts: 1
 
      06-14-2012
Hi, I need your help on this issue:
I have two table connected using Join command.
When I assign a value to the label it works, but since I need to assign two values, and the Join only works when you compare one field for each table, the second values is like the first. Here is the example>

Table A has ID and name

Table B has level1 and level2

I want:

b.level1 = a.ID (ID on record 1)

b.level2 = a.ID (ID on record 2)

I wanto to display a.name using a label command, but seems like label is able to get the first value since I am doing join on A where a.ID=b.level1

I do not know how to get b.level2=a.ID at the same time b.level1=a.ID

it is like:

a.ID = 1

a.name = "John"

a.ID = 2

a.name = "Maria"

b.level1 = 1

b.level2 = 2

using label with level1 and 2:

eval("level1") it shows 1

eval("level2") it shows 2

using label with name:

eval("name") it shows John

eval("name") it shows John (here I need to shows Maria instead)

Tks!
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Two dropdownlist and two tables... Paolo ASP .Net Web Controls 0 09-19-2006 04:42 PM
RE: how to programmatically assign text to a label control within a da ASP .Net 1 06-06-2006 09:40 AM
how to programmatically assign text to a label control within a datalist template? ASP .Net 1 06-05-2006 07:37 PM
Assign Text to Footer Label Will Chamberlain ASP .Net 2 10-03-2005 06:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57