navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Any Ideas? I am open to anything.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Any Ideas? I am open to anything.
Page: [1]
 
51

 

Posts: 49
Joined: 5/30/2002
From:
Status: offline

 
Any Ideas? I am open to anything. - 8/13/2003 15:51:10   
Here is the code:

<%
' Open database Start '


dim conn,rs,x
set conn=Server.CreateObject("ADODB.Connection")
conn.provider="Microsoft.Jet.OLEDB.4.0"
conn.open(server.mappath("/staff/g1/aau/GTCCP/gtccp.mdb"))
' Open database Complete '
%>




<html><head><title>GTCCP</title>
</head>
<body>

<%
on error resume next

unit="NA"
unit=Request.querystring("unit")


set rs=Server.CreateObject("ADODB.Recordset")
rs.open "SELECT Rank,First,Last,PMOS,Last_4_SSN,GTCCP_Group,GTCCP_Unit,MCTFS_PMCC,MCTFS_PRUC,Past_Due_Amount_30_Days,Past_Due_Amount_60_Days,Past_Due_Amount_90_Days,Past_Due_Amount_120_Days,Past_Due_Amount_150_Days,Past_Due_Amount_180_Days,Status_as_of_Date,Data_Run_Date FROM DELINQUENCY_RAW_updated_tbl WHERE GTCCP_Unit='" & unit & "'",conn

%>

<center><Table bgcolor="#cccccc" border=0 cellspacing=8><Tr><Td>
<table border=1 cellspacing=0 bgcolor="#224499" bordercolor="#224499" ><tr><%
Response.Write("<Td><font color='#FFFFFF'><b>Results For: </font></b> </td><td><font color='#FFFFFF'><b>" & unit & "</b> </font></td>")

for each x in rs.Fields
if x.name="Status_as_of_Date" then
Response.Write("<Tr><td><font color='#FFFFFF'><b>Status as of Date:</b> </font></td><td><font color='#FFFFFF'><b>" & x.value & "</b> </font></td>")
end if
if x.name="Data_Run_Date" then
Response.Write("<Tr><td><font color='#FFFFFF'><b>Data Run Date:</b> </font></td><td><font color='#FFFFFF'><b>" & x.value & "</b> </font></td>")
end if

next
%></table>
</td>
<Td align=right>
<Table border=0 cellspacing=0 bordercolor="red"><Tr><td>
<form method="get" action="Delinquency_report.asp">
<select name="unit">
<option value="2d LAAD Bn">2d LAAD Bn
<option value="HMH-461">HMH-461
<option value="HMLA-167">HMLA-167
<option value="HMLA-269">HMLA-269
<option value="HMM-162">HMM-162
<option value="HMM-263">HMM-263
<option value="HMM-264">HMM-264
<option value="HMM-266">HMM-266
<option value="HMM-365">HMM-365
<option value="HMT-302">HMT-302
<option value="HQ MACG-28">HQ MACG-28
<option value="HQ MAG-14">HQ MAG-14
<option value="HQ MAG-26">HQ MAG-26
<option value="HQ MAG-29">HQ MAG-29
<option value="HQ MAG-31">HQ MAG-31
<option value="HQ MWSG-27">HQ MWSG-27
<option value="MACS-2">MACS-2
<option value="MALS-14">MALS-14
<option value="MALS-26">MALS-26
<option value="MALS-29">MALS-29
<option value="MALS-31">MALS-31
<option value="MTACS-28">MTACS-28
<option value="MWHS-2">MWHS-2
<option value="MWSS-271">MWSS-271
<option value="MWSS-273">MWSS-273
<option value="MWSS-274">MWSS-274
<option value="VMA-223">VMA-223
<option value="VMA-231">VMA-231
<option value="VMA-542">VMA-542
<option value="VMAQ-2">VMAQ-2
<option value="VMAQ-3">VMAQ-3
<option value="VMAQ-4">VMAQ-4
<option value="VMAT-203">VMAT-203
<option value="VMFA(AW)-224">VMFA(AW)-224
<option value="VMFA(AW)-332">VMFA(AW)-332
<option value="VMFA(AW)-533">VMFA(AW)-533
<option value="VMFA-115">VMFA-115
<option value="VMFA-122">VMFA-122
<option value="VMFA-251">VMFA-251
</select> <input type="submit" value="Get Unit">
</form>
</td></table>
</td>
</table>
</center>
<Br>

<table border="1" cellpadding=0 cellspacing=0 width="100%" style="font-size:12;text-align:left">
<tr bgcolor="#b0c4de">


<%
' start write headers from table '
for each x in rs.Fields
if x.name="Status_as_of_Date" then%>

<%elseif x.name="Data_Run_Date" then%>

<%else%>
<%response.write("<th>" & x.name & "</th>")%>
<%end if
next
response.write("</tr>")
' end write headers from table '
%>

<!-- Start Table Query Loop to display all table information -->
<%do until rs.EOF%>
<tr bgcolor="#f0f0f0">
<%
for each x in rs.Fields
if x.name="Status_as_of_Date" then%>

<%elseif x.name="Data_Run_Date" then%>

<%else%>
<td><% Response.Write( "<nobr> " & x.value & "</nobr>") %> </td>
<%end if
next
' debug "
%>

<% rs.MoveNext %>
</tr>
<% loop %>
</form>
<!-- End Table Query Loop to display all table information -->


<%
' Close Connection '
rs.close
set rs=nothing
conn.close
set conn=nothing
' Connection Closed '
%>


</table>
</body>

</html>

if you look at the generated html i put in all the selection boxes for what to query. i want to be able to either
1. do a seperate sql statement so that it finds all unique units entries (MWHS-2, MALS-14, etc.) and write the selection box based on its results or
2. write a javascript function that does something similar.

the way it is set up is the selection box determines the "where columnValue = 'fromForm' " in the SQL statement. so each time it does that i think i still need to do a select * from table UNIQUE. Is unique the keyword i am looking for and how do i do two calls to the database ?

Any ideas?
Thank you for your time and assistance.
51

 

Posts: 49
Joined: 5/30/2002
From:
Status: offline

 
RE: Any Ideas? I am open to anything. - 8/14/2003 9:05:57   
Or does anyone know of any javascript websites I can get some sample code or some better insight as to how to accomplish this task?
Thanks again.

(in reply to 51)
BeTheBall

 

Posts: 6354
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Any Ideas? I am open to anything. - 8/14/2003 11:28:12   
Like this? http://www.devasp.com/samples/populatedropdown.asp

(in reply to 51)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Any Ideas? I am open to anything.
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts