Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formating asp in FP

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

Accepted Solution

by:
rcmb earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
Suggested Courses

971 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