学生联盟网为您提供优质参考范文! 体会工作报告法律咨询精彩演讲各类材料
当前位置: 学生联盟网 > 教学研究 > 教学反思 > 如何显示数据库的结构?_

如何显示数据库的结构?_

时间:2021-07-26 13:24:54 来源:学生联盟网

如何显示数据库的结构_ html head meta http-equivContent-Type contenttext/html; charsetgb2312 /head body bgcolorCCCCCC text000000 h2 aligncenter星河影动之查看数据库结构/h2 p on error resume next tablerequesttable 获得表名.if table then response.write 数据表table Set primary con.OpenSchemaadSchemaPrimaryKeys,_ Arrayempty,empty,table if primaryCOLUMN_NAME then primarykeyprimaryCOLUMN_NAME end if primary.close set primarynothing /p center table width650 border1 cellpadding0 cellspacing0 tr bgcolorCCCCCC th classsundog width61 div aligncenter字段/div /th th classsundog width131 div aligncenter类型/div /th th classsundog width105 div aligncenter设定大小/div /th th classsundog width69 div aligncenter允许空值/div /th th classsundog width69 自动编号 /th th classsundog width81主键/th /tr sqlselect * from table set rscon.cutesql for i0 to rs.fields.count-1 tr bgcolorCCCCCC td classsundog height2 width61 div aligncenterrsi.name/div ---------------------------------------------------------------------------------------------------------------- 字段名./td td classsundog height2 width131 div aligncenter field_typersi.type select case field_type case adEmpty typ Empty case adTinyInt typ TinyInt case adSmallInt typ SmallInt case adInteger typ Integer case adBigInt typ BigInt case adUnsignedTinyInt typ UnsignedTinyInt case adUnsignedSmallInt typ UnsignedSmallInt case adUnsignedInt typ UnsignedInt case adUnsignedBigInt typ UnsignedBigInt case adSingle typ Single case adDouble typ Double case adCurrency typ Currency case adDecimal typ Decimal case adNumeric typ Numeric case adBoolean typ Boolean case adError typ Error case adUserDefined typ UserDefined case adVariant typ Variant case adIDispatch typ IDispatch case adIUnknown typ IUnknown case adGUID typ GUID case adDATE typ DATE case adDBDate typ DBDate case adDBTime typ DBTime case adDBTimeStamp typ DBTimeStamp case adBStr typ BStr case adChar typ Char case adVarChar typ VarChar case adLongVarChar typ LongVarChar case adWChar typ WChar case adVarWChar typ VarWChar case adLongVarWChar typ LongVarWChar case adBinary typ Binary case adVarBinary typ VarBinary case adLongVarBinary typ LongVarBinary case adChapter typ Chapter case adPropVariant typ PropVariant case else typ Unknown ---------------------------------------------------------------------------------------------------------------- end select response.write typ 字段类型./div /td td classsundog height2 width105 div aligncenterrsi.definedsize/div /td 字段长度.td classsundog height2 width69 div aligncenter attribrsi.attributes if attrib and adFldIsNullable0 then response.write No else response.write Yes end if /div /td ---------------------------------------------------------------------------------------------------------------- 是否允许空值.td classsundog height2 width69 div aligncenter if rsi.PropertiesISAUTOINCREMENT True then typecheckbox nameautoincrement valuecheckbox checked else typecheckbox nameautoincrement valuecheckbox end if /div /td ---------------------------------------------------------------------------------------------------------------- 是否为自动编号.td classsundog height2 width81 div aligncenter if rsi.nameprimarykey then typecheckbox nameprimarykey valuecheckbox checked else typecheckbox nameprimarykey valuecheckbox end if /div /td ---------------------------------------------------------------------------------------------------------------- 主健./tr next /table /center 更多信息请查看IT技术专栏 ...