国产探花免费观看_亚洲丰满少妇自慰呻吟_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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 铅山县| 富阳市| 修武县| 精河县| 武平县| 田阳县| 仁寿县| 汝阳县| 宕昌县| 馆陶县| 醴陵市| 类乌齐县| 葫芦岛市| 甘南县| 双桥区| 博白县| 东乌| 雅安市| 衡东县| 江津市| 吉林省| 广安市| 建始县| 民和| 嫩江县| 武威市| 铜陵市| 云南省| 定西市| 宣汉县| 邵东县| 乐业县| 依安县| 吉隆县| 永川市| 达拉特旗| 文昌市| 城步| 青州市| 柳州市| 巴楚县|