Solved

Formating asp in FP

Posted on 2004-09-03
2
274 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
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 Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

756 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