国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

應用ADO.net得到系統表信息

2024-07-10 13:05:06
字體:
來源:轉載
供稿:網友
,歡迎訪問網頁設計愛好者web開發。'---------------------------------------------------------- '開發者:趙玉 '開發時間:2005.1.13 '功能:應用ado.net得到表 '---------------------------------------------------------- imports zy_dataaccess imports system imports system.data imports system.data.sqlclient imports system.data.oledb public class clsgettables '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得到所有表 '---------------------------------------------------------- public function getalltables(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.tables, _ new object() {nothing, nothing, nothing, nothing}) ' "table"}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得系統表 '---------------------------------------------------------- public function getsystemtables(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.tables, _ new object() {nothing, nothing, nothing, "system table"}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得用戶表 '---------------------------------------------------------- public function getusertables(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.tables, _ new object() {nothing, nothing, nothing, "table"}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得到系統視圖 '---------------------------------------------------------- public function getsystemviews(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.tables, _ new object() {nothing, nothing, nothing, "system view"}) ' "table"}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得到用戶視圖 '---------------------------------------------------------- public function getuserviews(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.tables, _ new object() {nothing, nothing, nothing, "view"}) ' "table"}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得到所有過程 '---------------------------------------------------------- public function getstoredprocedures(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.procedures, new object() {nothing, nothing, nothing, nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得到數據類型 '---------------------------------------------------------- public function getdatatypes(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.provider_types, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:得到表的列,my_tablename為空是所有的 '---------------------------------------------------------- public function gettablecolumns(byval cnstr as string, byval my_tablename as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() if my_tablename.trim = "" then my_tablename = nothing end if dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.columns, new object() {nothing, nothing, my_tablename, nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫名 '---------------------------------------------------------- public function getdbname(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.catalogs, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫表列的權限 '---------------------------------------------------------- public function getcolumn_privileges(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.column_privileges, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫表的索引 '---------------------------------------------------------- public function getindexes(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.indexes, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫表的主鍵 '---------------------------------------------------------- public function getprimary_keys(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.primary_keys, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫的存儲過程的參數 '---------------------------------------------------------- public function getprocedure_parameters(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.procedure_parameters, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫的架構信息 '---------------------------------------------------------- public function getschemata(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.schemata, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫的表的記錄數統計 '---------------------------------------------------------- public function getstatistics(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.statistics, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫的表的記錄數統計 '---------------------------------------------------------- public function gettable_statistics(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.table_statistics, new object() {nothing}) conn.close() return schematable end function '---------------------------------------------------------- '開發時間:2004.9.9 '功能:數據庫的中用戶可訪問的表 '---------------------------------------------------------- public function gettables_info(byval cnstr as string) as datatable dim conn as new oledbconnection(cnstr) conn.open() dim schematable as datatable = conn.getoledbschematable(oledbschemaguid.tables_info, new object() {nothing}) conn.close() return schematable end function end class
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宣威市| 密云县| 沿河| 白水县| 邹城市| 江门市| 阿拉善左旗| 卢氏县| 五指山市| 山东省| 咸丰县| 永德县| 磐安县| 桐城市| 青浦区| 西峡县| 邵阳县| 徐汇区| 九龙县| 甘南县| 赤壁市| 广宗县| 东方市| 龙山县| 宣汉县| 辉县市| 峨眉山市| 平罗县| 镇原县| 保亭| 福贡县| 武山县| 永仁县| 崇仁县| 彩票| 前郭尔| 曲沃县| 依兰县| 容城县| 疏附县| 娱乐|