用access和asp.net2005如何实现站内信
2个回答
展开全部
<%
db="#qqun_qqclg.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open connstr
set rs=server.CreateObject("adodb.recordset")
search=request.Form("search")
sql="select * from qqsys where qq link %'"&search&"'% or name like %'"&search&"'% or sf like %'"&search&"'% or jieshao like %'"&search&"'%"
rs.open sql,conn,1,1
if rs.eof and bof then
response.Write("没有找到相关内容")
else
while not rs.eof
response.Write(rs("qq"))
response.Write(rs("name"))
response.Write(rs("sf"))
response.Write(rs("jie"))
response.Write("<br>")
rs.movenext
wend
end if
rs.close
set rs=nothing
%>
<form action="?act=search" method="post">
<input type="text" name="search">
<input type="submit" name="button">
</form>
时间有限,没有调试
db="#qqun_qqclg.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
conn.Open connstr
set rs=server.CreateObject("adodb.recordset")
search=request.Form("search")
sql="select * from qqsys where qq link %'"&search&"'% or name like %'"&search&"'% or sf like %'"&search&"'% or jieshao like %'"&search&"'%"
rs.open sql,conn,1,1
if rs.eof and bof then
response.Write("没有找到相关内容")
else
while not rs.eof
response.Write(rs("qq"))
response.Write(rs("name"))
response.Write(rs("sf"))
response.Write(rs("jie"))
response.Write("<br>")
rs.movenext
wend
end if
rs.close
set rs=nothing
%>
<form action="?act=search" method="post">
<input type="text" name="search">
<input type="submit" name="button">
</form>
时间有限,没有调试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
string str1 = "insert into user1 values('" + this.TextBox1.Text.Trim() + "','" + this.TextBox11.Text.Trim() + "','" + this.TextBox2.Text.Trim() + "','" + this.DropDownList1.SelectedValue + "','" + this.RadioButtonList1.SelectedItem.Text + "','" + this.TextBox10.Text.Trim() + "','" + this.TextBox9.Text.Trim() + "','" + filename1 + "')";
SqlCommand cmd1 = new SqlCommand(str1, con1);
SqlCommand cmd1 = new SqlCommand(str1, con1);
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询