Problems displaying query results

Results 1 to 2 of 2

Thread: Problems displaying query results

  1. #1
    Philipp Krapp Guest

    Default Problems displaying query results

    Hello,<BR><BR>I have the following sql-statement<BR><BR>sql = "SELECT tabelle.feld2,location.*,used.* FROM<BR>tabelle,location,used "<BR><BR>but I cannot display the results with<BR><BR>&#060;%=rs("location.feld2")%&#062;<BR >or<BR>&#060;%=rs("used.feld12")%&#062;<BR><BR>A ll results are displayed with the value 0 (what is definitely not<BR>right).<BR><BR>Can anybody post me an example how to display queryresults from<BR>multiple tables?<BR><BR>Thank you very much in advance for your help<BR><BR>Sincerly,<BR><BR>Philipp Krapp<BR>

  2. #2
    Neil Popham Guest

    Default RE: Problems displaying query results

    you should be ok just using the field NAME (not table) as the reference, ie: &#060;%=rs("feld12")%&#062;. not &#060;%=rs("used.feld12")%&#062;<BR><BR>however , this does mean that all your field names, irrespective of table need to be UNIQUE.<BR><BR>if this is a problem, then you could reference your fields by their field index, rather than name, ie: &#060;%=rs(5)%&#062;.<BR><BR>there is an interesting article, regarding why this is beneficial, in ANY recordset, here:<BR><BR><BR><BR>i suppose, to avoid any clashes of field names, you could also use AS, ie: "... table1.field1, table2.field1 AS t2_field1 ..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts