repeater show the field data of 2 same table

  • Thread starter Thread starter Budd
  • Start date Start date
B

Budd

i find some problem on repeater when i want to join 2 same table to 1 table
e.g.
company(id, customerid1, customerid2)
customer(id, name)
and join company to 2 customer table(customerid1=>customer.id and
customerid2=>customer.id)

when i use the code <%# DataBinder.Eval(Container.DataItem,
"customertable1.name") %>

it error and show
'System.Data.Common.DbDataRecord' does not contain a property with the name
customertable

customertable1 is the other name of customer table

and i find that it don't support table with field format for get the data

So how to show the "customer.name"?

any solution??

thx a lot
 
I assume you made a query in such a way that the resulting record set is a
single table.

Try giving alias name to the columns, like

select ... customertable1.name as Customer1Name..

Eliyahu
 
it work
thx a lot
Eliyahu Goldin said:
I assume you made a query in such a way that the resulting record set is a
single table.

Try giving alias name to the columns, like

select ... customertable1.name as Customer1Name..

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top