%@ Language=VBScript %> <% Option Explicit %> <% Dim RS, strSQL , intCID, CourseName, CourseDate, CourseAddress intCID= "" if REQUEST("CID") <>"" then if IsNumeric(REQUEST("CID")) then intCID = REQUEST("CID") end if if intCID= "" then Response.End() my_conn.Open ConnString %> <% set RS = server.CreateObject("ADODB.RecordSet") strSQL = "SELECT qeyCourseDetail.*, tblCourse.* from qeyCourseDetail INNER JOIN tblCourse on tblCourse.intID = qeyCourseDetail.intCourse where tblCourse.intID = " & intCID 'Response.Write strSQL 'Response.End() set RS = my_conn.Execute(strSQL) if not (RS.bof or RS.EOF) then CourseName = RS("strCourse") CourseAddress = RS("strAddress1") &" " & RS("strAddress2") &" " & RS("strCity") &", " & RS("strShort")&" " & RS("strPostCode") CourseDate = formatDate("%l, %F %d %Y",RS("dteStart")) + " " + RS("strTime") else RS.Close() set RS = nothing my_conn.close set my_conn = nothing Response.End() end if RS.Close() set RS = nothing %>
<% my_conn.close set my_conn = nothing %>