World Of Webmaster
Đăng nhập / Đăng ký
Account
Free for web
Check pagerank
Input check pager (Not http://)

Ext: blog.kai.vn
Check google pagerank
View HTML source
FUNCTION LIBRARY
HTML Tags Library
PHP Functions Library ASP Functions Library
ASP Functions Tables
Chức năng: Trả lại một mảng chứa tên của tất cả các bảng trong database
Ngôn ngữ: asp - Nhóm: database
CÚ PHÁP
  array = Tables(connstring) 

Trả lại một mảng chứa tên của tất cả các bảng trong DB.
Cần đối số connstring là một OLE DB xác định đang kết nối.

VÍ DỤ
<%
  dim i, ar, cn
  
    cn =     "Provider=Microsoft.Jet.OLEDB.4.0;Data  Source=" & server.mappath ("/database/mydata.mdb") & ";"
  
      ar = Tables(cn)
  
  for i = 0 to ubound(ar) - 1
       '--- write each  table name to the browser
      response.write ar(i) & "<BR>"
  next
%> 
ASP Code
<%
  Private Function Tables(byval connstring)
      Dim adox, i, strTables
      Set adox = Server.CreateObject("ADOX.Catalog")
      adox.ActiveConnection = connstring
      for i = 0 to adox.tables.count - 1
          if UCase( adox.tables(i).type ) = "TABLE" then
              strTables = strTables & adox.tables(i).name & vbCrLf
          end if
      next
      Set adox = nothing
      Tables = split( strTables, vbCrLf )
  End Function '--- Tables
%> 

CompactDB
DateDB
EscapeApos
EscapeBit
EscapeDate
EscapeInt
MkDatabase
NoSQLInjection
Procedures
RecordCount
Library ›› HTML Tag | PHP Function | ASP Function
Page : 806839
Online :
Visited : 370162
 
Liên h | Thêm vào Favorite | Gửi link qua e-mail | Thông tin website
Copright © 2009 KAI Blog
Code by BOINGOnline. Contact email : contact@kai.vn
Theme: default | classic |