ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old June 24th, 2003, 12:57 PM
mgamber mgamber is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 1 mgamber User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem with SQL generated from Access on an ASP page

The following SQL code does not return anything to the Full_Name fields when the ASP page tries to display it in a table.

SELECT TestLabMasterTable.Test_Request_Number, TestLabMasterTable.Description, TestLabMasterTable.Percent_Complete, EmployeeTable.Full_Name, TestLabMasterTable.Priority_Code, TestLabMasterTable.Date_Submitted, TestLabMasterTable.Date_Requested_Completion, TestLabMasterTable.Date_Promised_Completion, TestLabMasterTable.Date_Samples_Promised, TestLabMasterTable.Date_Samples_Delivered, TestLabMasterTable.Date_Actual_Completion, TestLabMasterTable.Date_Report_Distributed, EmployeeTable_1.Full_Name
FROM (TestLabMasterTable LEFT JOIN EmployeeTable ON TestLabMasterTable.Assigned_ToEID = EmployeeTable.EID) LEFT JOIN EmployeeTable AS EmployeeTable_1 ON TestLabMasterTable.Requested_ByEID = EmployeeTable_1.EID
WHERE (((TestLabMasterTable.Percent_Complete)<100) AND ((TestLabMasterTable.Cancelled)<>Yes))
ORDER BY TestLabMasterTable.Test_Request_Number;

This is generated by Access via the Export to ASP utility.

Here is what the ASP tries to display;

On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>
<TR VALIGN=TOP>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Test_Request_Number").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Description").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Percent_Complete").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("EmployeeTable.Full_Name").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Priority_Code").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Submitted").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Requested_Completion").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Promised_Completion").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Samples_Promised").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Samples_Delivered").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Actual_Completion").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ALIGN=RIGHT><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("Date_Report_Distributed").Value)%><BR></FONT></TD>
<TD BORDERCOLOR=#c0c0c0 ><FONT SIZE=2 FACE="Arial" COLOR=#000000><%=Server.HTMLEncode(rs.Fields("EmployeeTable_1.Full_Name").Value)%><BR></FONT></TD>

</TR>
<%
rs.MoveNext
loop%>

Any help? I think it is in the AS clause.

Reply With Quote
  #2  
Old June 25th, 2003, 08:29 AM
lordkyl lordkyl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 27 lordkyl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try rs.fields("EmployeeTable_1.Full_Name")

or, in the select clause use EmployeeTable.Full_Name AS Full_Name and just pull rs.fields("Full_Name")

Hope this helps

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Problem with SQL generated from Access on an ASP page


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway