数据库管理工具 <% 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 %>
 滚装知识

汽车滚装运输概况

过去10年来,随着全球汽车贸易量的不断增加,汽车航运市场对汽滚船的需求十分旺盛。全球汽车滚装船船运力总体上保持着上升的趋势,年均增长率以载重吨计为6.8%,超过全球商船船队的年均增长速度。2005年全球成交新船49艘共26万车位,截至2006年4月,全球手持汽滚船订单为148艘共83.6万车位,以艘数计为世界汽滚船运力的25.6%。2005年新船的完工量为34艘,较上年增长42%。目前全球汽车滚装船船队严重老化。现有船队中,船龄小于10年的船有229艘,船龄为10~20年的船有113艘,船龄为20~25年的船有128艘,船龄大于25年的船有101艘,还有15艘船的船龄达到30年以上。一般汽滚船以拆解船龄为25年计,至2008年将有155艘船达到此船龄。业内人士预测,未来10年,全世界需建造230艘汽滚船才能满足市场需求。根据全球汽滚船手持订单的情况来估算,2006~2009年的交船量将达到148艘:其中2006年为32艘、17.1万车位,2007年为55艘、29.9万车位,2008年为48艘、28.2万车位,2009年为13艘、8.3万车位。

     航运界人士普遍认为:中国汽车航运时代已经来临。为此,我国沿海、内河港口相继建设汽车码头,国内航运巨头也纷纷购买汽滚船,大力开拓汽车航运业务。近几年,我国汽车工业发展迅速,汽车销量由2000年的207万辆增长到2005年的576万辆。2004年,我国出口汽车总量达到了12万辆,比2001年增加了4.5倍。根据汽车行业的"十一五"规划,2010年,我国的汽车产量将达到950万~1000万辆。国家发改委预测,到2010年,我国汽车出口有望达到100万辆以上。汽车的海运成本比陆路运输节省30%左右,汽车航运市场的发展前景看好。被国家海关总署指定为汽车进出口海运口岸的大连、天津、上海、广州四大沿海港口,以及南京、武汉等内河港口,纷纷上马汽车滚装船码头建设项目。

     2004年9月,大连港集团与日本邮船和中远太平洋共同投资6亿元,开工建设汽车码头。今年5月,大连港的汽车码头进入试运营阶段,该码头一期工程码头全长470米,堆场面积24万平方米,建设规模为1万吨和5万吨级泊位各一个。天津港与日本邮船株式会社共同投资建设的天津港滚装码头已于2005年末正式启用,成为我国北方第一座专业汽车滚装码头。该码头占地13.8万平方米,有大型深水泊位两个,码头岸线长471.7米,可以满足8000车位滚装船靠泊。码头堆场面积8万平方米,可停放约4800辆商品车。上海港的汽车码头则于今年3月通过验收并正式对外开放。据悉,上海海通国际汽车码头是上海唯一的汽车滚装码头,由上海海通国际汽车码头有限公司、上海国际港务(集团)股份有限公司、上海汽车工业销售有限公司、日本邮船株式会社、上港集箱(澳门)有限公司、上海汽车工业(香港)有限公司共同投资建设,码头一期泊位长219.4米、前沿水深14米,可停靠国际大型滚装船舶。此外,码头的陆域面积26.5万平方米,拥有可同时停放7000辆汽车的专用堆场。去年5月,广州港新沙汽车滚装船码头正式投入使用。该码头位于珠江东岸、一次可停放汽车1万辆。今年6月,国内最大的汽车滚装码头在广州南沙投入使用。该码头拥有3个深水泊位,其中2个为汽车滚装船专用泊位,1个为多功能、多用途泊位,能靠泊当今世界最大的汽车滚装船,一次可停放汽车2万辆。

     在沿海港口纷纷建设汽车专用码头的同时,内河港口也同样关注着汽车航运市场。2002年4月,长江第一个汽车滚装码头--南京港汽车滚装船码头投入试运营。该码头总投资约8000万元人民币,建有万吨级滚装泊位和千吨级滚装泊位各一个。今年春节前,武汉港商品汽车滚装码头投入试运营,该码头一期工程总投资9500万元。

     由于看好我国汽车航运市场,国内外航运巨头纷纷拓展汽车航运。2002年10月,中远集团与日本邮船株式会社合资成立中远日邮汽车船运输有限公司,开拓汽车航运业务。2003年11月,该公司的"富康口"号从辽宁营口抵达广州,标志着中远正式开通内地沿海南北双向整车运输航线。2005年4月,其"富泉口"号在上海外高桥港滚装码头装载120辆东风卡车以及奇瑞、吉利等国产轿车共300多辆驶往中东地区,揭开了我国汽车出口首搭我国汽车滚装船的序幕。目前中远共拥有4艘汽滚船,"富康口"号为750车位、"富源口"号为850车位、"富泉口"号为1290车位、"常发口"号为2950车位,4艘船的总运力近6000车位。中海集团于2003年、2004年,分别组建了与日本川崎汽船合资的中海川崎汽车船运输有限公司、独资的大连中海汽车船公司。中海集团成立中海川崎汽车船公司主要是为一汽丰田和广州丰田汽车在国内的运输提供服务,大连中海公司的目的则是志在发展自己的汽车滚装船队。目前中海川崎公司拥有1艘3294车位的汽滚船"东方高速"号,大连中海公司则于2005年2月购入了3294车位的"中海高速"号,并分别于2005年3月和9月起经营国际、国内航线。去年2月,中海集团又和以色列以星航运公司签约,租赁了该公司两艘6400车位和两艘4900车位新建汽滚船,拥有了目前国内最先进的汽滚船。中国对外贸易运输(集团)公司也于2004年4月与日本商船三井合资成立了中外运-商船三井航运有限公司。作为中国最大内河航运企业的中国长江航运集团总公司,早在1992年就购进"长吉"号汽滚船,开始了汽车运输业务。2004年6月,长航通过下属全资子公司深圳长航实业发展有限公司与日本丰藤海运株式会社、丰田通商株式会社合作,成立了深圳长航丰海汽车物流有限公司;并通过合资公司这个平台,获得了中国最大的丰田车生产基地--天津一汽丰田汽车水运业务的承运权。

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