如何用Asp取得數(shù)據(jù)庫(kù)中所有表名和字段名_ASP教程
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!
推薦:Asp讀取文本文件并顯示html head http-equiv=Content-Type content=text/html; charset=gb2312 title/title /head body % LANGUAGE = VBScript % % Const ForReading = 1, ForWriting = 2, ForAppending = 8 Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse
| < % set rs=server.CreateObject("adodb.recordset") db="db.mdb" '只要直接更改數(shù)據(jù)庫(kù)名稱就能夠看到效果了。 set conn=server.CreateObject("adodb.connection") connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db) conn.open connstr Set rs=Conn.OpenSchema(20) Do Until rs.EOF If rs(3)="TABLE" Then response.write "表名:"&rs(2)&"<br />" Set rs1=server.CreateObject("adodb.recordset") sql="select * from "&rs(2) Set rs1=conn.execute(sql) response.write "字段名:" For i=0 To rs1.fields.count-1 response.write rs1.fields(i).name&" " Next response.write "<br />" Do While Not rs1.eof response.write " " For i=0 To rs1.fields.count-1 t=rs1.fields(i).name response.write rs1(t)&" " Next response.write " " rs1.movenext Loop response.write " " End If rs.MoveNext Loop Set rs=Nothing Set conn=nothing % > |
分享:asp怎樣利用InstrRev()獲取文件名InstrRev函數(shù),從字符串的最后一個(gè)搜索起,前面字符串。 % Dim strTXT,pos strTXT=www.webjx.com pos=instrRev(strTXT,.) Response.Write pos % 我們搜索的起始是倒序,從com前的一個(gè)點(diǎn)。起始的字符的長(zhǎng)度,含此點(diǎn),共十個(gè)字符,返回的結(jié)果將是9。 通過(guò)
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫(kù)實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過(guò)濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁(yè)模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無(wú)組件分頁(yè)實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- 解讀ASP編程菜鳥易犯的一個(gè)錯(cuò)誤
- ASP優(yōu)化 用數(shù)據(jù)綁定實(shí)現(xiàn)高效率動(dòng)態(tài)網(wǎng)頁(yè)
- ASP中實(shí)現(xiàn)從dbf數(shù)據(jù)庫(kù)導(dǎo)出數(shù)據(jù)到sql表
- ASP 3.0高級(jí)編程(三十九)
- asp xmlhttp下載一句話
- 解決IIS5 HTTP500內(nèi)部錯(cuò)誤
- asp限制上傳文件大小實(shí)例
- 用ASP制作餅圖、柱狀圖等
- ASP中數(shù)據(jù)庫(kù)調(diào)用中常見錯(cuò)誤的現(xiàn)象和解決
- 網(wǎng)站安全:防范ASP木馬的十大基本原則
- 相關(guān)鏈接:
- 教程說(shuō)明:
ASP教程-如何用Asp取得數(shù)據(jù)庫(kù)中所有表名和字段名
。