程序代码:
<%
Set rs=server.createobject("adodb.recordset")
rs.open "select Sex from dbo.Contact",conn,1,1
if not(rs.eof and rs.bof) then
Sex=split(rs("Sex"),"&")
end if
rs.close
set rs=nothing
%>
程序代码:
添加代码:
<%
if request.form("Submit")="添加" then
wenti=request.form("wenti")
Sex1=request.form("Sex1")
Sex2=request.form("Sex2")
Sex3=request.form("Sex3")
Sex4=request.form("Sex4")
abc=wenti&"&"&Sex1&"&"&Sex1&"&"&Sex2&"&Sex3&"&Sex4
conn.Execute "insert into answer(Question_answer) values('"&abc&"')"
end if
%>
读取代码:
<%
Set rs=server.createobject("adodb.recordset")
rs.open "select Question_answer from dbo.answer",conn,1,1
if not(rs.eof and rs.bof) then
Sex=split(rs("Question_answer"),"&")
end if
rs.close
set rs=nothing
%>