数据库管理工具 <% table_name=tables Function IIf(var, val1, val2) If var = True Then IIf = val1 Else IIf = val2 End If End Function '正则表达式函数,用于删除注释 '------------------------------------- Function RegExpReplace(strng, patrn, replStr) Dim regEx,match,matches ' 建立变量。 Set regEx = New RegExp ' 建立正则表达式。 regEx.Pattern = patrn ' 设置模式。 regEx.IgnoreCase = True ' 设置是否区分大小写。 regEx.Global = True ' 设置全局可用性。 RegExpReplace = regEx.Replace(strng, replStr) ' 作替换。 End Function '==================================================================ADOVBS 常量声明 '---- DataTypeEnum Values ---- Const adEmpty = 0 Const adTinyInt = 16 Const adSmallInt = 2 Const adInteger = 3 Const adBigInt = 20 Const adUnsignedTinyInt = 17 Const adUnsignedSmallInt = 18 Const adUnsignedInt = 19 Const adUnsignedBigInt = 21 Const adSingle = 4 Const adDouble = 5 Const adCurrency = 6 Const adDecimal = 14 Const adNumeric = 131 Const adBoolean = 11 Const adError = 10 Const adUserDefined = 132 Const adVariant = 12 Const adIDispatch = 9 Const adIUnknown = 13 Const adGUID = 72 Const adDate = 7 Const adDBDate = 133 Const adDBTime = 134 Const adDBTimeStamp = 135 Const adBSTR = 8 Const adChar = 129 Const adVarChar = 200 Const adLongVarChar = 201 Const adWChar = 130 Const adVarWChar = 202 Const adLongVarWChar = 203 Const adBinary = 128 Const adVarBinary = 204 Const adLongVarBinary = 205 '---- FieldAttributeEnum Values ---- Const adFldMayDefer = &H00000002 Const adFldUpdatable = &H00000004 Const adFldUnknownUpdatable = &H00000008 Const adFldFixed = &H00000010 Const adFldIsNullable = &H00000020 Const adFldMayBeNull = &H00000040 Const adFldLong = &H00000080 Const adFldRowID = &H00000100 Const adFldRowVersion = &H00000200 Const adFldCacheDeferred = &H00001000 '---- SchemaEnum Values ---- '---- SchemaEnum Values ---- Const adSchemaProviderSpecific = -1 Const adSchemaAsserts = 0 Const adSchemaCatalogs = 1 Const adSchemaCharacterSets = 2 Const adSchemaCollations = 3 Const adSchemaColumns = 4 Const adSchemaCheckConstraints = 5 Const adSchemaConstraintColumnUsage = 6 Const adSchemaConstraintTableUsage = 7 Const adSchemaKeyColumnUsage = 8 Const adSchemaReferentialConstraints = 9 Const adSchemaTableConstraints = 10 Const adSchemaColumnsDomainUsage = 11 Const adSchemaIndexes = 12 Const adSchemaColumnPrivileges = 13 Const adSchemaTablePrivileges = 14 Const adSchemaUsagePrivileges = 15 Const adSchemaProcedures = 16 Const adSchemaSchemata = 17 Const adSchemaSQLLanguages = 18 Const adSchemaStatistics = 19 Const adSchemaTables = 20 Const adSchemaTranslations = 21 Const adSchemaProviderTypes = 22 Const adSchemaViews = 23 Const adSchemaViewColumnUsage = 24 Const adSchemaViewTableUsage = 25 Const adSchemaProcedureParameters = 26 Const adSchemaForeignKeys = 27 Const adSchemaPrimaryKeys = 28 Const adSchemaProcedureColumns = 29 Const adSchemaDBInfoKeywords = 30 Const adSchemaDBInfoLiterals = 31 Const adSchemaCubes = 32 Const adSchemaDimensions = 33 Const adSchemaHierarchies = 34 Const adSchemaLevels = 35 Const adSchemaMeasures = 36 Const adSchemaProperties = 37 Const adSchemaMembers = 38 Const adSchemaTrustees = 39 Const adSchemaFunctions = 40 Const adSchemaActions = 41 Const adSchemaCommands = 42 Const adSchemaSets = 43 '==================================================================返回字段类型函数 Function typ(field_type) 'field_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 = "TinyInt" 'UnsignedTinyInt case adUnsignedSmallInt:typ = "UnsignedSmallInt" case adUnsignedInt:typ = "UnsignedInt" case adUnsignedBigInt:typ = "UnsignedBigInt" case adSingle:typ = "Single" 'Single case adDouble:typ = "Double" 'Double case adCurrency:typ = "Money" 'Currency case adDecimal:typ = "Decimal" case adNumeric:typ = "Numeric" 'Numeric case adBoolean:typ = "Bit" '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" 'GUID case adDATE:typ = "DateTime" 'Date case adDBDate:typ = "DBDate" case adDBTime:typ = "DBTime" case adDBTimeStamp:typ = "DateTime" 'DBTimeStamp case adBSTR:typ = "BSTR" case adChar:typ = "Char" case adVarChar:typ = "VarChar" case adLongVarChar:typ = "LongVarChar" case adWChar:typ = "Text" 'WChar类型 SQL中为Text case adVarWChar:typ = "VarChar" 'VarWChar case adLongVarWChar:typ = "Text" 'LongVarWChar case adBinary:typ = "Binary" case adVarBinary:typ = "VarBinary" case adLongVarBinary:typ = "LongBinary"'LongVarBinary case adChapter:typ = "Chapter" case adPropVariant:typ = "PropVariant" case else:typ = "Unknown" end select End Function '==================================================================返回字段类型列表 Function fieldtypelist(n) dim strlist,str1,str2 strlist = "" response.write strlist End Function '==================================================================主界面 sub main(str) on error resume next %>
 
<% end sub '==================================================================修改表名或字段名 2006-09-08 sub reobj() on error resume next Dim mydb,mytable,tablename tablename = request("tablename") Set mydb = Server.CreateObject("ADOX.Catalog") mydb.ActiveConnection = conn if request("obj") = "field" then '修改字段名 dim fieldsname,newfieldsname fieldsname = request("fieldsname") newfieldsname = request("newfieldsname") Set mytable = Server.CreateObject("ADOX.Table") Set mytable = mydb.Tables(tablename) mytable.Columns(fieldsname).Name = newfieldsname end if if request("obj") = "table" then '修改表名 dim newtablename newtablename = request("newtablename") mydb.Tables(tablename).Name = newtablename end if if err <> 0 then response.write err.description response.write "" exit sub end if if request("obj") = "field" then response.Redirect "?key=view&table_name=" & tablename else response.Redirect "?key=view&table_name=" & newtablename end if end sub '==================================================================查看表结构函数 sub view(table_name) 'table_name = 表名称 dim rs,sql,table,primary,primarykey,i,editstr,typs on error resume next table = table_name Set primary = Conn.OpenSchema(adSchemaPrimaryKeys,Array(empty, empty, table)) if primary("COLUMN_NAME") <> "" then primarykey = primary("COLUMN_NAME") end if primary.Close Set primary = Nothing %> 表:<%=tables%>    

<% if request("key") = "editfidlevi" then call editfidlevi() %> <% sql = "SELECT * FROM [" & table_name & "] " Set rs = Conn.Execute(sql) if err = 0 then For i = 0 to rs.fields.count-1 %> <% editstr = editstr&"" next %>
字 段 名 类 型 设定大小 允许空 自动编号 主键 执行操作
<%=rs(i).name%> <%=typ(rs(i).type)%> <%=rs(i).definedsize%> <%=iif((rs(i).Attributes and adFldIsNullable)=0,"No","Yes")%> <%=iif(rs(i).Properties("ISAUTOINCREMENT") = True,"是","否")%> <%=iif(rs(i).name = primarykey,"是","否")%> 修改  删除
<% '显示修改字段名 response.write " 改名为 " & chr(10) response.write " " & chr(10) response.write " 修改字段属性:
&table_name=<%=request("table_name")%>" method="post" name=frm onSubmit="return validate(frm)">
字段名 类型 设定大小 允许空值 自动编号
<%=rs(i).name%> <% fieldtypelist(request("fidletype")) %> > >

<% end if next end sub '==================================================================执行修改字段属性 sub editfidle() on error resume next sql = "ALTER TABLE [" & request("table_name") & "] " sql = sql&"ALTER COLUMN [" & request("fidle") & "] " if request("field_type") <> "" then sql = sql & request("field_type") end if if request("size") <> "" then sql = sql & "(" & request("size") & ") " end if if request("null") = "" then sql = sql & " not null" end if if request("autoincrement") = "y" then sql = sql & " identity" end if sql = trim(sql) conn.execute(sql) response.redirect "?key=view&table_name="& request("table_name") end sub '==================================================================添加字段函数 sub addfield() on error resume next fldname = request("fldname") fldtype = request("field_type") if fldtype="VarChar" then fldsize="255" else fldsize = request("fldsize") end if fldnull = request("null") fldautoincrement = request("autoincrement") table_name = request("table_name") if fldname <> "" and fldtype <> "" then sql = "alter table [" & table_name & "] add ["&fldname&"] " & fldtype if fldsize <> "" then sql = sql & "(" & fldsize & ")" end if if fldnull <> "ON" then sql = sql & " not null" end if if fldautoincrement = "ON" then sql = sql & " identity" end if conn.execute(sql) response.redirect "?key=view&table_name=" & table_name else response.write "输入数据错误!" end if if err <> 0 then response.write err.description response.write "" response.end end if end sub sub exesql(sql) on error resume next '==================================================================执行sql函数 if trim(request.form("SchemaTable")) <> "" then Call showSchema (adSchemaTables) if trim (request.form("SchemaColumn")) <> "" then Call showSchema(adSchemaColumns) if trim (request.form("SchemaProvider")) <> "" then Call showSchema(adSchemaProviderTypes) sql = trim(request("sql")) if sql = "" then exit sub sql = RegExpReplace(sql, "(--)(.)*\n", "") '替换注释 sql = RegExpReplace(sql, "\n[\s| ]*\r", "") '替换空行 sql = RegExpReplace(sql, "\n", "") '替换换行符 sql = RegExpReplace(sql, "\r", "") '替换回车符 if (LCase(left(sql,len("select"))) = "select") and instr(sql,"into") = 0 then Call showSelect (sql) if err <> 0 then response.write "
" & err.description & "" response.end else '如果非select语句,允许执行多条以分号分隔的语句 dim aSql,iLoop aSql = split(sql,";") for iLoop = 0 to UBound(aSql) if trim(aSql(iLoop)) <> "" then conn.execute (aSql(iLoop)) if err <> 0 then response.write "
" & err.description & "
  " response.write iLoop + 1 & "、
" & aSql(iLoop) & "
" 'err.clear() '忽略错误 exit sub '中止执行 else response.write "
" & iLoop + 1 & "、" & aSql(iLoop) & "
" end if end if next response.write "

命令执行成功

" end if end sub %>
<% select case request("key") case "" '显示主界面 call main("") case "addtable" '显示创建表界面 call add_table(request("table_name"),request("field_num")) case "createtable" '执行创建表 call create_table() case "view" call view(request("table_name")) case "sql" call main("1") call exesql(trim(request("sql"))) case "addfield" call addfield() case "editfidlevi" call view(request("table_name")) case "editfidle" call editfidle() case "exit" session("dbtype") = "" session("dbstr") = "" session("db007pass") = "" response.redirect "?" case "tosql" call tosql(request("strt")) case "proc" call main("1") call showproc() case "help" call help() case "edit" call EditData() case "reobj" call reobj() end select %>
 危险品知识

如何办理危险货物的托运

1.危险货物的托运订舱必须按各类不同危险特性分别缮制托运单办理订舱配船,以便船方按各种不同特性的危险货物按照《国际海运危规》的隔离要求分别堆装陨运输,以利安全。例如一份信用证和合同中同时出运氧化剂、易燃液体和腐蚀品三种不同性质的货物,托运时必须按三种不同性质危险货物分别缮制三份托运单,切不能一份托运单同时托运三种性质互不相容的危险货物;否则,船方就会将三种互不相容的危险货物装在一起,三种不同性质、互不相容的货物极容易互相接触,产生化学反应,引起燃烧、爆炸,造成事故。如是集装箱运输,切忌互不相容的危险货物同装一集装箱内。 2. 托运单的缮制. 除一般普通货物共同需要的内容(如:目的港、唛头、收货人、通知人、品名、重量、尺码、件数等等)以外,危险货物的托运单还需增加下述七项内容:

  A.货物名称必须用正确的化学学名或技术名称,不能使用人们不熟悉的商品俗名。例如:“漂白粉或漂粉精”不能用BLEACHING POWDER,而应使用“三氧化二砷”。

  B.必须注明危险货物DANGEROUS CARGO字样,以引起船方和船代理的重视。

  C.必须注明危险货物的性质和类别。例如:氧化剂(OXIDIZING AGENT)和第5.1类(CLASS 5.1)字样,或易燃液体(INFLAMMABLE LIQUID)和第3.2类(CLASS 3.2)。

  D.必须注明联合国危险编号,例如:磷酸为U N NO.1805。

  E.必须注明《国际海运危规》页码,例如:硝酸钾为IMDG CODE PAGE 5171。

  F.易燃液体必须注明闪点,例如:FLASH PIONT 20摄氏度。

  G.另外,需在积载时有特殊要求的,也必须在托运单上注明,供船舶配载时参考。例如:必须装舱面的货物,需注明DECK SHIPMENT ONLY;需远离火源和热源的货物,应注明FAR AWAY FROM FIRE AND HEAT!等等。

 

时间:2011/1/13 浏览次数:3788 
 
  信息查询
  请输入查询号:
 
  设为首页 | 收藏本站
CopyRight© 2006-2018All Right Reserved  客服热线:021-53851118 53850998 
  地址:上海市浦东新区祖冲之路2277弄4号楼    版权所有:上海德誉供应链管理股份有限公司