Solved

Formating asp in FP

Posted on 2004-09-03
2
257 Views
Last Modified: 2013-12-24
0
Comment
Question by:dtolo
2 Comments
 
LVL 12

Accepted Solution

by:
rcmb earned 500 total points
ID: 11980475
Save this page as confirmation_page.asp and you should be good to go:

<html>
<%
set OBJdbConn = Server.CreateObject("ADODB.Command")
sConnStr = "DRIVER={SQL Server};SERVER=15ff9099pc;DATABASE=TA;UID=sa;PWD=olot9864"
OBJdbConn.Open  sConnStr
SQLQuery = "SELECT DepartmentName FROM Departments WHERE DepartmentID = " & request("DepartmentID") & " "

Set Rs = OBJdbConn.Execute(SQLQuery)  

Do While Not Rs.EOF

varDepartment = Rs("DepartmentName")

   Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
OBJdbConn.Close
Set OBJdbConn = Nothing
%>

<%
set OBJdbConn = Server.CreateObject("ADODB.Command")
sConnStr = "DRIVER={SQL Server};SERVER=15ff9099pc;DATABASE=TA;UID=sa;PWD=olot9864"
OBJdbConn.Open  sConnStr
SQLQuery = "SELECT Instructor FROM Instructors WHERE InstructorID = " & request("InstructorID") & " "

Set Rs = OBJdbConn.Execute(SQLQuery)  

Do While Not Rs.EOF

varInstructor = Rs("Instructor")

   Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
OBJdbConn.Close
Set OBJdbConn = Nothing
%>

<%
set OBJdbConn = Server.CreateObject("ADODB.Command")
sConnStr = "DRIVER={SQL Server};SERVER=15ff9099pc;DATABASE=TA;UID=sa;PWD=olot9864"
OBJdbConn.Open  sConnStr
SQLQuery = "SELECT ClassName FROM ClassNames WHERE ClassNameID = " & request("ClassNameID") & " "

Set Rs = OBJdbConn.Execute(SQLQuery)  

Do While Not Rs.EOF

varClassName = Rs("ClassName")

   Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
OBJdbConn.Close
Set OBJdbConn = Nothing
%>

<%
set OBJdbConn = Server.CreateObject("ADODB.Command")
sConnStr = "DRIVER={SQL Server};SERVER=15ff9099pc;DATABASE=TA;UID=sa;PWD=olot9864"
OBJdbConn.Open  sConnStr
SQLQuery = "SELECT Location FROM Locations WHERE LocationID = " & request("LocationID") & " "

Set Rs = OBJdbConn.Execute(SQLQuery)  

Do While Not Rs.EOF

varLocation = Rs("Location")

   Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
OBJdbConn.Close
Set OBJdbConn = Nothing
%>

<head>
<% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_LCID = 1033 %>
<meta http-equiv="Content-Language" content="en-us"> <% ' FP_ASP -- ASP Automatically generated by a Frontpage Component. Do not Edit.
FP_CharSet = "windows-1252"
FP_CodePage = 1252 %>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Add New Class And Attendees</title> </head>

<body bgcolor="#0454AC">

<table border="0" cellpadding="6" cellspacing="0" width="100%" bgcolor="#FFFFFF" id="UpdateSAC">
            <tr>
                  <td bgcolor="#AAB3D5">
                  <p align="center"><b><font face="Tahoma" size="2">The following information was submitted.</font></b><tr>
                  <td bgcolor="#AAB3D5">
                  <table id="table1">
      <nobr>
                  <font face="Tahoma"><span style="background-color: #AAB3D5">
      <font color="#0454AC" size="2"><b>Class Name: </b></font><font size="2"><%=varClassName%>&nbsp;</font></span></font></nobr></td>
            </tr>
            <tr>
                  <td width="40%" colspan="2" bgcolor="#E0DDD8"><font face="Tahoma">
                  <span style="background-color: #E0DDD8"><font size="2"><b>
                  <font color="#0454AC">Class Date and Time</font>:</b><%=Request("DT")%></font></span></font></td>
                  <td align="right" width="10%" bgcolor="#E0DDD8"><nobr>
                  <font face="Tahoma"><span style="background-color: #E0DDD8">
                  <font size="2"><b><font color="#0454AC">Instructor:&nbsp;</font></b></font></span></font></nobr></td>
                  <td width="45%" bgcolor="#E0DDD8">
            <span style="background-color: #E0DDD8">
            <font face="Tahoma" size="2"><%=varInstructor%></font></span></td>
            </tr>
            <tr>
                  <td width="40%" colspan="2" bgcolor="#E0DDD8"><nobr>
                  <font face="Tahoma"><span style="background-color: #E0DDD8">
                  <font size="2"><b><font color="#0454AC">Department:</font> </b><%=varDepartment%>&nbsp;</font></span></font></nobr></td>
                  <td align="right" width="10%" bgcolor="#E0DDD8"><nobr>
                  <font face="Tahoma"><span style="background-color: #E0DDD8">
                  <font size="2"><b><font color="#0454AC">Location:&nbsp;</font></b></font></span></font></nobr></td>
                  <td width="45%" bgcolor="#E0DDD8">
            <span style="background-color: #E0DDD8">
            <font face="Tahoma" size="2"><%=varLocation%></font></span></td>
            </tr>
            <tr>
                  <td width="18%" bgcolor="#DCDFED" valign="top">
                  <font face="Tahoma" size="2" color="#0000FF"><b>Attendees</b></font><font face="Tahoma" size="2" color="#0454AC">:</font></td>
                  <td width="22%" rowspan="2" bgcolor="#DCDFED" valign="top">
<%
set OBJdbConn = Server.CreateObject("ADODB.Command")
sConnStr = "DRIVER={SQL Server};SERVER=15ff9099pc;DATABASE=TA;UID=sa;PWD=olot9864"
OBJdbConn.Open  sConnStr
SQLQuery = "SELECT LastName, FirstName FROM Employee WHERE EmployeeNumber IN (" & request("Students") & ") "

Set Rs = OBJdbConn.Execute(SQLQuery)  

Do While Not Rs.EOF

varStudent = Rs("LastName") & ", " & Rs("FirstName") & "<br>"
%>
<%=varStudent%>
<%
   Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
OBJdbConn.Close
Set OBJdbConn = Nothing
%>
                  </td>
                  <td rowspan="2" bgcolor="#DCDFED" valign="top">
                  <b><font face="Tahoma" size="2" color="#0454AC">Notes:</font></b></td>
                  <td rowspan="2" bgcolor="#DCDFED" valign="top">
            <font face="Tahoma" size="2"><%=Request("Notes")%></font></td>
            </tr>
            <tr>
                  <td width="18%" bgcolor="#DCDFED" valign="top">&nbsp;</td>
            </tr>
            </table>
</body>

</html>
0
 
LVL 2

Author Comment

by:dtolo
ID: 11981900
Question continued to:   Question continued from:  http://www.experts-exchange.com/Applications/MS_Office/FrontPage/Q_21119327.html
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now