469,946 Members | 1,876 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

ASP doubt

30
hi frenz,

I have created an asp page to display data from a table in my database(sql server). I have a problem here, I want to display those records satisfying the condition in my where clause, where-in,two columns of the table will not have value for certain records. Now, i dont want to show those two column headings in my asp page, only for those records which doesnot have value for those two columns, but the rest of the data should get displayed for tht data,and all the records satisying my query. Its urgent, any help will be appreciated. Thanks in advance. I am providing with code snippet of my asp page, for reference...

The two column headings i'm referring to in my problem st' are: Notes and Rejection Reason. Refer the code.

Expand|Select|Wrap|Line Numbers
  1. <td align="left" valign="top"><table width="692" border="0" cellspacing="0" cellpadding="4">
  2.  
  3.                     <tr align="left" valign="top"> 
  4.                       <td width="56" height="20" class="blacksubtitle">CRID</td>
  5.                       <td width="104" height="20" class="blacksubtitle">Date</td>
  6.                       <td width="76" height="20" class="blacksubtitle">GFS Order ID</td>
  7.                       <td width="60" height="20" class="blacksubtitle">Markys ID</td>
  8.                       <td width="55" height="20" class="blacksubtitle">Amount</td>
  9.                       <td width="81" class="blacksubtitle"></td>
  10.                       <td width="111" class="blacksubtitle"></td>
  11.                       <td width="85" class="blacksubtitle"></td>
  12.                     </tr>
  13.                     <%if cntofrecords>0 then %>
  14.                                         <% Do While NOT objRS.EOF %>
  15.                     <tr align="left" valign="top"> 
  16.  
  17.                       <td width="56" height="36"><% Response.Write(objRS(0)) %></td>
  18.     <td width="104" height="36"><%=month(objRS(1))%>/<%=day(objRS(1))%>&nbsp;<%=FormatDateTime(objRS(1), 3)%>
  19.     <% 'Response.Write(objRS(1)) %></td>
  20.     <td width="76" height="36"><% Response.Write(objRS(2)) %></td>
  21.     <td width="60" height="36"><% Response.Write(objRS(3)) %></td>
  22.     <td width="55" height="36"><% Response.Write(FormatCurrency(objRS(4))) %></td>
  23.  
  24.                 <form name="form2" method="post" action="ApprovedPage.asp">
  25.                 <td width="81" height="36"> <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
  26.                 <input name="btnApprove" type="submit" id="btnApprove" value="Approve" class="button10"/>
  27.                 </td>
  28.                 </form>
  29.  
  30.                       <form name="form3" method="post" action="RequestInfoPage.asp">
  31.                         <td width="111"> 
  32.                           <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>">
  33.                           <input name="btnRequestinfo" type="submit" id="btnRequestinfo" value="Request Info" class="button14"/>
  34.                         </td>
  35.                       </form>
  36.  
  37.                          <form name="form4" method="post" action="RejectedPage.asp">
  38.                         <td width="85"> 
  39.                           <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
  40.                          <input name="btnReject" type="submit" id="btnReject" value="Reject" class="button10"/>
  41.                         </td>
  42.                       </form>
  43.                     </tr>
  44.  
  45.                     <tr align="left" valign="top"> 
  46.                     <tr><td>&nbsp;</td>
  47.   <td colspan="7"><label><em>Credit Reason:</em> 
  48.       <% Response.Write(objRS(5)) %></label></td></tr>
  49.   <tr><td>&nbsp;</td>
  50.   <td colspan="7"><label><em>Notes:</em> 
  51.       <% Response.Write(objRS(6)) %></label></td></tr>
  52.   <tr><td>&nbsp;</td>
  53.   <td colspan="7"><label><em>Rejection Reason:</em> 
  54.       <% Response.Write(objRS(7)) %></label></td></tr>
  55.  
  56. <% 
  57. objRS.MoveNext
  58. Loop
  59. ' close and kill our objects
  60. 'objRS.Close: Set objRS = Nothing
  61. 'objConn.Close: Set objConn = Nothing
  62. else
  63. %>
  64. <% .....%>
Cheers,
jai
Jan 17 '07 #1
1 1162
jai80
30
Hi frenz,

In continuation to my latest submission of my asp doubt today, i wanted to update the group, that i have solved the problem.

I take this opportunity to extend my appreciation and sincere thanks to all the group members for solving the doubts of other members in various platforms, for the timely help and for keeping the group updated with latest infoz in IT.
Gud Work & Best Wishes!

Cheers,
jai


hi frenz,

I have created an asp page to display data from a table in my database(sql server). I have a problem here, I want to display those records satisfying the condition in my where clause, where-in,two columns of the table will not have value for certain records. Now, i dont want to show those two column headings in my asp page, only for those records which doesnot have value for those two columns, but the rest of the data should get displayed for tht data,and all the records satisying my query. Its urgent, any help will be appreciated. Thanks in advance. I am providing with code snippet of my asp page, for reference...

The two column headings i'm referring to in my problem st' are: Notes and Rejection Reason. Refer the code.

Expand|Select|Wrap|Line Numbers
  1. <td align="left" valign="top"><table width="692" border="0" cellspacing="0" cellpadding="4">
  2.  
  3.                     <tr align="left" valign="top"> 
  4.                       <td width="56" height="20" class="blacksubtitle">CRID</td>
  5.                       <td width="104" height="20" class="blacksubtitle">Date</td>
  6.                       <td width="76" height="20" class="blacksubtitle">GFS Order ID</td>
  7.                       <td width="60" height="20" class="blacksubtitle">Markys ID</td>
  8.                       <td width="55" height="20" class="blacksubtitle">Amount</td>
  9.                       <td width="81" class="blacksubtitle"></td>
  10.                       <td width="111" class="blacksubtitle"></td>
  11.                       <td width="85" class="blacksubtitle"></td>
  12.                     </tr>
  13.                     <%if cntofrecords>0 then %>
  14.                                         <% Do While NOT objRS.EOF %>
  15.                     <tr align="left" valign="top"> 
  16.  
  17.                       <td width="56" height="36"><% Response.Write(objRS(0)) %></td>
  18.     <td width="104" height="36"><%=month(objRS(1))%>/<%=day(objRS(1))%>&nbsp;<%=FormatDateTime(objRS(1), 3)%>
  19.     <% 'Response.Write(objRS(1)) %></td>
  20.     <td width="76" height="36"><% Response.Write(objRS(2)) %></td>
  21.     <td width="60" height="36"><% Response.Write(objRS(3)) %></td>
  22.     <td width="55" height="36"><% Response.Write(FormatCurrency(objRS(4))) %></td>
  23.  
  24.                 <form name="form2" method="post" action="ApprovedPage.asp">
  25.                 <td width="81" height="36"> <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
  26.                 <input name="btnApprove" type="submit" id="btnApprove" value="Approve" class="button10"/>
  27.                 </td>
  28.                 </form>
  29.  
  30.                       <form name="form3" method="post" action="RequestInfoPage.asp">
  31.                         <td width="111"> 
  32.                           <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>">
  33.                           <input name="btnRequestinfo" type="submit" id="btnRequestinfo" value="Request Info" class="button14"/>
  34.                         </td>
  35.                       </form>
  36.  
  37.                          <form name="form4" method="post" action="RejectedPage.asp">
  38.                         <td width="85"> 
  39.                           <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
  40.                          <input name="btnReject" type="submit" id="btnReject" value="Reject" class="button10"/>
  41.                         </td>
  42.                       </form>
  43.                     </tr>
  44.  
  45.                     <tr align="left" valign="top"> 
  46.                     <tr><td>&nbsp;</td>
  47.   <td colspan="7"><label><em>Credit Reason:</em> 
  48.       <% Response.Write(objRS(5)) %></label></td></tr>
  49.   <tr><td>&nbsp;</td>
  50.   <td colspan="7"><label><em>Notes:</em> 
  51.       <% Response.Write(objRS(6)) %></label></td></tr>
  52.   <tr><td>&nbsp;</td>
  53.   <td colspan="7"><label><em>Rejection Reason:</em> 
  54.       <% Response.Write(objRS(7)) %></label></td></tr>
  55.  
  56. <% 
  57. objRS.MoveNext
  58. Loop
  59. ' close and kill our objects
  60. 'objRS.Close: Set objRS = Nothing
  61. 'objConn.Close: Set objConn = Nothing
  62. else
  63. %>
  64. <% .....%>
Cheers,
jai
Jan 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

138 posts views Thread by ambika | last post: by
4 posts views Thread by dam_fool_2003 | last post: by
20 posts views Thread by maadhuu | last post: by
3 posts views Thread by SMG | last post: by
77 posts views Thread by muttaa | last post: by
11 posts views Thread by Bob Nelson | last post: by
122 posts views Thread by ivan | last post: by
5 posts views Thread by Paulo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.