hbojorquezgeek
asked on
Dreamweaver ASP and MSSQL--- multiple query problem
When I run the following query in the Query Analyzer I get correct values
SELECT dbo.tutee.idratuteeid,dbo. tutee.firs tname,dbo. tutee.last name,dbo.t utee.mi,db o.tutee.gr adelevel,d bo.tutee.r oom,dbo.tu tee.elemte acherid,db o.elemteac her.elemte acherid,db o.elemteac her.firstn ame,dbo.el emteacher. lastname
FROM dbo.tutee, dbo.elemteacher
WHERE dbo.elemteacher.elemteache rid=dbo.tu tee.elemte acherid
AND dbo.tutee.teachercoordid =101
When Dreamweaver's ASP repeated regions behavior codes it like this..
<td><%=(Recordset1.Fields. Item("idra tuteeid"). Value)%></ td>
<td><%=(Recordset1.Fields. Item("firs tname").Va lue)%></td >
<td><%=(Recordset1.Fields. Item("last name").Val ue)%></td>
<td><%=(Recordset1.Fields. Item("mi") .Value)%>< /td>
<td><%=(Recordset1.Fields. Item("grad elevel").V alue)%></t d>
<td><%=(Recordset1.Fields. Item("room ").Value)% ></td>
<td><%=(Recordset1.Fields. Item("elem teacherid" ).Value)%> </td>
<td><%=(Recordset1.Fields. Item("elem teacherid" ).Value)%> </td>
<td><%=(Recordset1.Fields. Item("firs tname").Va lue)%></td >
<td><%=(Recordset1.Fields. Item("last name").Val ue)%></td>
The firstname and lastname values come from the same table which is BAD!!!
What can I add to the Dreamweaver ASP code to call from the correct tables.
Since I am a dumb dumb...I tried
<td><%=(Recordset1.Fields. Item("dbo. elemteache r.lastname ").Value)% ></td>
and got a an error.
Obviously one of the problems is that the column names in the separate tables are the same...firstname, lastname...
1. Should I have named the differently?
2. Is there a way for Dreamwever's ASP to differentiate between dbo.elemteacher.lastname and dbo.tutee.lastname
Thanks
SELECT dbo.tutee.idratuteeid,dbo.
FROM dbo.tutee, dbo.elemteacher
WHERE dbo.elemteacher.elemteache
AND dbo.tutee.teachercoordid =101
When Dreamweaver's ASP repeated regions behavior codes it like this..
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
<td><%=(Recordset1.Fields.
The firstname and lastname values come from the same table which is BAD!!!
What can I add to the Dreamweaver ASP code to call from the correct tables.
Since I am a dumb dumb...I tried
<td><%=(Recordset1.Fields.
and got a an error.
Obviously one of the problems is that the column names in the separate tables are the same...firstname, lastname...
1. Should I have named the differently?
2. Is there a way for Dreamwever's ASP to differentiate between dbo.elemteacher.lastname and dbo.tutee.lastname
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thanks I'm sure ?!
just don't forget to close out on a Question if you have the answer :-)
just don't forget to close out on a Question if you have the answer :-)
ASKER
Thank you...I am an obvious beginner at SQL and had no idea that I could do that... I've learned so much from this place about triggers and etc...THANKS!
You so rock.