& lt!-車身,td,th {font-size:12px;}" />
當前位置:編程學習大全網 - 編程語言 - Mdb編程

Mdb編程

1,妳想要的程序代碼。這不需要conn.asp的文件。為了方便調試,我將conn.asp文件的內容添加到下面的文件中。

此外,將它放在與數據庫相同的目錄中。

& ltstyle type="text/css " >

& lt!-

車身,td,th {

font-size:12px;

}

-& gt;

& lt/style & gt;

& ltform name = " form 1 " method = " post " action = " " & gt;

請輸入貨運單號:

& ltinput type = " text " name = " p _ sort _ txt " & gt;

& lt輸入type = " submit " name = " submit " value = " query " >

& lt/form & gt;

& lt%

if request . form(" Submit ")& lt;& gt”“那麽

設置conn =服務器。CreateObject("ADODB。連接”)

conn . open " DRIVER = { Microsoft Access DRIVER(*。MDB)};DBQ = " & amp;server . mappath(" 8x 9 . MDB ")& amp;";"

SQL = " select * from 56770 _ product where p _ sort = ' " & amp;request . form(" p _ sort _ txt ")& amp;"

設置rs =服務器。CreateObject("adodb.recordset ")

康涅狄格州,1,1

如果rs.eof那麽

回應。寫(“沒有找到相關記錄!”)

其他

% & gt

& lttable width = " 700 " border = " 1 " >

& lttr & gt

& ltTD width = " 30 " height = " 25 " bgcolor = " # d 9f 2 ff " >ID & lt/TD & gt;

& lttd height="25" bgcolor="#D9F2FF " >運貨單號碼

& lttd height="25" bgcolor="#D9F2FF " >從

& lttd height="25" bgcolor="#D9F2FF " >目的地

& lttd height="25" bgcolor="#D9F2FF " >接收日期

& lttd height="25" bgcolor="#D9F2FF " >簽署人

& lttd height="25" bgcolor="#D9F2FF " >簽名單位

& lttd height="25" bgcolor="#D9F2FF " >貨物的當前位置

& lttd height="25" bgcolor="#D9F2FF " >評論

& lt/tr & gt;

& lt%

而不是rs.eof

% & gt

& lttr & gt

& lttd width="30" height="25 " >& lt% = RS(" p _ id ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ sort ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ name ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ bianma ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ chandi ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ guige ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ danwei ")% & gt;& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _姚萇")% & gt& lt/TD & gt;

& lttd height="25 " >& lt% = RS(" p _ jinhuoshang ")% & gt;& lt/TD & gt;

& lt/tr & gt;

& lt%

rs.movenext

rs關閉

設置rs =無

連接關閉

設置連接=無

% & gt

& lt/table & gt;

& lt%

如果…就會結束

如果…就會結束

% & gt

  • 上一篇:想給孩子報興趣班,哪幾種興趣班可得要避開,“智商稅”可別交?
  • 下一篇:計算機面試常見問題是什麽?
  • copyright 2024編程學習大全網