Alex C
06-07-2004, 01:21 AM
Hey,
I'm running this SQL Query in my ASP page,
' Create command string
sqlCommandUpdateFields = _
" SELECT" _
& " NoticeBoardID" _
& " , NoticeBoardNm" _
& " , NoticeBoard.DivisionID" _
& " , NoticeBoard.HomeBaseID" _
& " , CheckIn" _
& " , CheckOut" _
& " , Location" _
& " , DueDate" _
& " , DueTime" _
& " , Title" _
& " , OfficePhNo" _
& " , MobilePhNo" _
& " , Division.DivisionNm" _
& " , HomeBase.HomeBaseNm" _
& " FROM" _
& " NoticeBoard" _
& " INNER JOIN Division" _
& " ON NoticeBoard.DivisionID=Division.DivisionID" _
& " INNER JOIN HomeBase" _
& " ON NoticeBoard.HomeBaseID=HomeBase.HomeBaseID" _
& " WHERE" _
& " NoticeBoardID=" & RecordNumber
Then I'm outputting some of these values in a table with this code,
<table width="100%"><tr><td colspan="2">
<font size="4"><b>Employee Information</b></font>
<br><br>
</td></tr>
<tr><td>
<font size="3"><b>Title:</b></font>
</td><td>
<%=RsUpdate("Title")%>
</td></tr>
<tr><td>
<font size="3"><b>Division:</b></font>
</td><td>
<%=RsUpdate("DivisionNm")%>
</td></tr>
<tr><td>
<font size="3"><b>Home base:</b></font>
</td><td>
<%=RsUpdate("HomeBaseNm")%>
</td></tr>
<tr><td>
<font size="3"><b>Office No:</b></font>
</td><td>
<%=RsUpdate("OfficePhNo")%>
</td></tr>
<tr><td>
<font size="3"><b>Mobile No:</b></font>
</td><td>
<%=RsUpdate("MobilePhNo")%>
</td></tr>
<tr><td>
<font size="3"><b>Email Address:</b></font>
</td><td>
email address
</td></tr></table>
But there seems to be a problem with my query because none of the values are shown. Everything works fine without the second INNER JOIN, NoticeBoard.HomeBaseID and HomeBase.HomeBaseNm lines. I'm wondering if this is my problem, can anyone see what I'm doing wrong?
Thanks,
Alex
I'm running this SQL Query in my ASP page,
' Create command string
sqlCommandUpdateFields = _
" SELECT" _
& " NoticeBoardID" _
& " , NoticeBoardNm" _
& " , NoticeBoard.DivisionID" _
& " , NoticeBoard.HomeBaseID" _
& " , CheckIn" _
& " , CheckOut" _
& " , Location" _
& " , DueDate" _
& " , DueTime" _
& " , Title" _
& " , OfficePhNo" _
& " , MobilePhNo" _
& " , Division.DivisionNm" _
& " , HomeBase.HomeBaseNm" _
& " FROM" _
& " NoticeBoard" _
& " INNER JOIN Division" _
& " ON NoticeBoard.DivisionID=Division.DivisionID" _
& " INNER JOIN HomeBase" _
& " ON NoticeBoard.HomeBaseID=HomeBase.HomeBaseID" _
& " WHERE" _
& " NoticeBoardID=" & RecordNumber
Then I'm outputting some of these values in a table with this code,
<table width="100%"><tr><td colspan="2">
<font size="4"><b>Employee Information</b></font>
<br><br>
</td></tr>
<tr><td>
<font size="3"><b>Title:</b></font>
</td><td>
<%=RsUpdate("Title")%>
</td></tr>
<tr><td>
<font size="3"><b>Division:</b></font>
</td><td>
<%=RsUpdate("DivisionNm")%>
</td></tr>
<tr><td>
<font size="3"><b>Home base:</b></font>
</td><td>
<%=RsUpdate("HomeBaseNm")%>
</td></tr>
<tr><td>
<font size="3"><b>Office No:</b></font>
</td><td>
<%=RsUpdate("OfficePhNo")%>
</td></tr>
<tr><td>
<font size="3"><b>Mobile No:</b></font>
</td><td>
<%=RsUpdate("MobilePhNo")%>
</td></tr>
<tr><td>
<font size="3"><b>Email Address:</b></font>
</td><td>
email address
</td></tr></table>
But there seems to be a problem with my query because none of the values are shown. Everything works fine without the second INNER JOIN, NoticeBoard.HomeBaseID and HomeBase.HomeBaseNm lines. I'm wondering if this is my problem, can anyone see what I'm doing wrong?
Thanks,
Alex