Solved

Formating asp in FP

Posted on 2004-09-03
2
278 Views
Last Modified: 2013-12-24
0
Comment
Question by:dtolo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

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…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

752 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