无码视频在线观看,99人妻,国产午夜视频,久久久久国产一级毛片高清版新婚

  • 億恩科技有限公司旗下門(mén)戶(hù)資訊平臺(tái)!
    服務(wù)器租用 4元建網(wǎng)站

    ASP程序員必須要掌握的幾個(gè)知識(shí)點(diǎn)

    ASP是動(dòng)態(tài)服務(wù)器頁(yè)面(Active Server Page)的英文縮寫(xiě)。是微軟公司開(kāi)發(fā)的代替CGI腳本程序的一種應(yīng)用,它可以與數(shù)據(jù)庫(kù)和其它程序進(jìn)行交互,是一種簡(jiǎn)單、方便的編程工具。ASP的網(wǎng)頁(yè)文件的格式是 .asp?,F(xiàn)在常用于各種動(dòng)態(tài)網(wǎng)站中。如果你是ASP程序員那么你就必須要必備以下知識(shí)。

    ASP是動(dòng)態(tài)服務(wù)器頁(yè)面(Active Server Page)的英文縮寫(xiě)。是微軟公司開(kāi)發(fā)的代替CGI腳本程序的一種應(yīng)用,它可以與數(shù)據(jù)庫(kù)和其它程序進(jìn)行交互,是一種簡(jiǎn)單、方便的編程工具。ASP的網(wǎng)頁(yè)文件的格式是 .asp?,F(xiàn)在常用于各種動(dòng)態(tài)網(wǎng)站中。如果你是ASP程序員那么你就必須要必備以下知識(shí)。
    ASP程序員必須要掌握的幾個(gè)知識(shí)點(diǎn)

    數(shù)據(jù)庫(kù)連接:
    <%
    set conn=server.createobject("adodb.connection")
    conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("數(shù)據(jù)庫(kù)名")
    %>

    打開(kāi)數(shù)據(jù)庫(kù):
    exec="select * from 數(shù)據(jù)庫(kù)表"
    set rs=server.createobject("adodb.recordset")
    rs.open exec,conn,1,1
    參數(shù)1,1為讀取
    讀取內(nèi)容格式:<%=rs("字段")%>

    添加記錄處理程序:
    <%
    set conn=server.createobject("adodb.connection")
    conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("數(shù)據(jù)庫(kù)名")
    name=request.form("字段") name,tel,message為提交表單所設(shè)置的字段值
    tel=request.form("字段")
    message=request.form("字段")
    exec="insert into 表名(字段)values(';"+字段+"';)" 多個(gè)用逗號(hào)隔開(kāi)
    conn.execute exec 使用execute提交
    conn.close
    set conn=nothing
    %>

    搜索處理程序:
    <%
    name=request.form("字段") name,tel為提交表單所設(shè)置的字段值
    tel=request.form("字段")
    set conn=server.createobject("adodb.connection")
    conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("數(shù)據(jù)庫(kù)名")
    exec="select * from 表 where name=';"+字段+"'; and tel="+字段
    set rs=server.createobject("adodb.recordset")
    rs.open exec,conn,1,1
    %>

    頁(yè)面搜索到的內(nèi)容導(dǎo)出來(lái):
    <%
    do while not rs.eof
    %><tr>
    <td><%=rs("name")%></td>
    <td><%=rs("tel")%></td>
    <td><%=rs("time")%></td>
    </tr>
    <%
    rs.movenext
    loop
    %>

    刪除記錄處理程序:
    <%
    set conn=server.createobject("adodb.connection")
    conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("數(shù)據(jù)庫(kù)名")
    exec="delete * from 表名 where 編號(hào)="&request.form("id")
    conn.execute exec
    %>

    修改記錄處理程序:
    <%
    set conn=server.createobject("adodb.connection")
    conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("數(shù)據(jù)庫(kù)名")
    exec="select * from 表名 where 編號(hào)="&request.form("id")
    set rs=server.createobject("adodb.recordset")
    rs.open exec,conn,1,3 ';1,3為修改意思
    rs("name")=request.form("字段") ';name,tel,message為提交表單所設(shè)置的字段值
    rs("tel")=request.form("字段")
    rs("message")=request.form("字段")
    rs.update
    rs.close
    set rs=nothing
    conn.close
    set conn=nothing
    %>

    修改記錄執(zhí)行程序:輸入ID號(hào)頁(yè)面>>>導(dǎo)出相對(duì)應(yīng)ID數(shù)據(jù)>>>>>>直接修改的處理程序
    后臺(tái)登陸處理程序例子:

    <%
    dim name,password
    name=request.form("name")
    password=request.form("password")
    dim exec,conn,rs
    exec="select *from 表名 where(name=';"&字段&"'; and password=';"&字段&"';)"
    set conn=server.createobject("adodb.connection")
    conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("數(shù)據(jù)庫(kù)名")
    set rs=server.createobject("adodb.recordset")
    rs.open exec,conn
    if not rs.eof then
    rs.Close
    conn.Close
    session("checked")="yes"
    session("check")="right"
    response.Redirect "index.asp"
    else
    session("checked")="no"
    session("check")="wrong"
    response.Redirect "login.asp"
    end if
    %>

    每個(gè)后臺(tái)頁(yè)面加上:
    <%if not session("checked")="yes" then ';session里面定義一個(gè)checked字符串變量
    response.Redirect "login.asp"
    else
    %>

    作為ASP程序員的你,以上ASP知識(shí)你都掌握了嗎?

    河南億恩科技股份有限公司(mszdt.com)始創(chuàng)于2000年,專(zhuān)注服務(wù)器托管租用,是國(guó)家工信部認(rèn)定的綜合電信服務(wù)運(yùn)營(yíng)商。億恩為近五十萬(wàn)的用戶(hù)提供服務(wù)器托管、服務(wù)器租用、機(jī)柜租用、云服務(wù)器、網(wǎng)站建設(shè)、網(wǎng)站托管等網(wǎng)絡(luò)基礎(chǔ)服務(wù),另有網(wǎng)總管、名片俠網(wǎng)絡(luò)推廣服務(wù),使得客戶(hù)不斷的獲得更大的收益。
    服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話(huà):0371-60135900
    虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話(huà):0371-55621053
    網(wǎng)絡(luò)版權(quán)侵權(quán)舉報(bào)電話(huà):0371-60135995
    服務(wù)熱線(xiàn):0371-60135900

    0
    0
    分享到:責(zé)任編輯:小柳

    相關(guān)推介

    共有:0條評(píng)論網(wǎng)友評(píng)論:

    驗(yàn)證碼 看不清換一張 換一張

    親,還沒(méi)評(píng)論呢!速度搶沙發(fā)吧!