<%

%>
<!--#include file="te_config.asp"-->
<%
	lConnID = request("cid")
	sSQL = request("txtSQL")

	'Query returns records?
	if request("chkRec") = "" then
		bRecordReturn = False
	else
		bRecordReturn = True
		response.redirect "te_showtable.asp?cid=" & lConnID & "&q=1&tablename=" & server.urlencode(sSQL)
	end if

%>
<!--#include file="te_header.asp"-->

<table border=0 cellspacing=1 cellpadding=2 bgcolor = "#ffe4b5" width=100%>
	<tr>
		<td class="smallertext">
			<a href="index.asp">管理首页</a> <a href="te_admin.asp">编辑页面</a> <a href="te_listtables.asp?cid=<%=request("cid")%>"><%=arrDesc(request("cid"))%></a> 提出疑问
		</td>
		<td class="smallerheader" width=130 align=right>
		<%
		if bProtected then 
			response.write session("teFullName")
			response.write "<a href=""te_logout.asp""> (退出)</a>" 
		end if
		%>
		</td>
	</tr>
</table>
<br>

<%
	response.write "<p class=""smallerheader"">执行疑问:</p>"
	response.write "<p class=""smallertext"">" & sSQL & "</p>"
	
	
	on error resume next

	conn.Open arrConn(lConnID)
	set rs = conn.Execute (sSQL, lRecordsAffected)
	
	if Err <> 0 then
		response.write "<p class=""smallerheader"">错误:</p>"
		response.write err.description
	end if
	
	if not bRecordReturn then
		'If the query doesnt return records;
		response.write lRecordsAffected & " records affected."
	end if

%>

<!--#include file="te_footer.asp"-->
 

