SQLServer2000andXMLErikVeermanConsultantIntellinetBusinessIntelligenceObjectivesGiveanoverviewonthenewXMLcapabilitiesinSQLServer2000DemonstrateratherthanpresentProvidebaseknowledgefor…XMLarchitecturedecisionsResearchstartingpointsProsandconsofparallelXMLtechnologyimplementationsDatainteractionleveragingSQL'sXMLcapabilitiesAgendaTheabilitytoretrieveandwriteXMLdata:RetrieveXMLdatausingtheSELECTstatementandtheFORXMLclause.
WriteXMLdatausingOPENXMLrowsetprovider.
TheabilitytoaccessSQLServerusingHTTP.
IISConfigurationTemplateQueriesXSLStylesheetsAgendaSupportforXDRschemas/XMLViewsXPathqueriesagainsttheseschemas.
XMLforSQLWebReleaseBulkLoadUpdategramADOprogrammingmethods(ChrisHagen)XMLinuse(ChrisHagen)Agenda:SQLServer2000XMLSELECTHowhasSQLServerextendedtheSELECTparadigmtosupportXMLSELECTStatementSyntax:SELECT………FORXML{RAW|AUTO|EXPLICIT}[,XMLDATA][,ELEMENTS][,BINARYBase64]SimpleXMLQuery:SELECToh.
CustomerID,oh.
OrderId,od.
ProductID,od.
UnitPrice,od.
QuantityFROMOrdersohINNERJOIN[OrderDetails]odONoh.
orderid=od.
orderidFORXML{RAW|AUTO}FORXMLRAWFormatTakesthequeryresultandtransformseachrowintheresultsetintoanXMLelementwithagenericidentifierastheelementtag.
FORXMLAUTOFormatReturnsqueryresultsinasimple,nestedXMLtree.
EachtableintheFROMclauseforwhichatleastonecolumnislistedintheSELECTclauseisrepresentedasanXMLelement.
ThecolumnslistedintheSELECTclausearemappedtotheappropriateelementattributes.
FORXMLEXPLICITFormatBasedontheconceptofaUniversalTablecontainingalltheinformationabouttheresultingXMLtree.
ContainsTagandParentmeta-dataTag:TagnumberofcurrentelementParent:TagnumberofparentelementColumnnamesareXMLGenericidentifiers.
Identifier!
TagNumber!
AttributeNameEXPLICITSampleQuerySELECT1ASTag,NULLASParent,oh.
CustomerID[Order!
1!
CustomerID],oh.
OrderId[Order!
1!
OrderId],NULL[OrderDetail!
2!
ProductId],NULL[OrderDetail!
2!
UnitPrice],NULL[OrderDetail!
2!
Quantity]FROMOrdersohWHEREoh.
CustomerId='ANTON'UNIONALLSELECT2,1,oh.
CustomerID,oh.
OrderId,od.
ProductID,od.
UnitPrice,od.
QuantityFROMOrdersohINNERJOIN[OrderDetails]odONoh.
orderid=od.
orderidWHERECustomerId='ANTON'ORDERBY[Order!
1!
CustomerID],[Order!
1!
OrderId],[OrderDetail!
2!
ProductId]FORXMLEXPLICITSELECTXMLFormatsDEMOAgenda:SQLServer2000OpenXMLAllowsonetoparseandutilizeanXMLdocumentOpenXMLProcessInputanXMLdocumentProcessaninternalrepresentationexecsp_xml_preparedocumentParsetheXMLdocumentOpenXMLRowsetfunctionRemoveinternalrepresentationfrommemoryEXECsp_xml_removedocumentOpenXMLProcessOpenXMLSyntaxOPENXML(idocint[in],rowpatternnvarchar[in],[flagsbyte[in]])[WITH(SchemaDeclaration|TableName)]OpenXMLProcessDEMOAgenda:SQLServer2000IISIntegrationHowdoesoneuseIISforretrievingXMLdata.
UsingIIS,theprocess.
ConfigureanIISVirtualRootDefinetemplatequeriesDefinestylesheetsMakeHTTPrequestConfigureanIISVirtualRootDEMOHTTPAccesstoDataURLQueryhttp://sqlserver/vrootparametersParametersSql=SELECT+*+FROM+Sku+FOR+XML+RAWEncoding=UTF-8Root=rootHTTPAccesstoDataDirectQueryGoodforasingleselectofasinglecolumnValueisreturnedinnativeformat,notXMLEnablesdirectretrievalofobjectslikeimages,OLEobjects,etc.
http://sqlserver/vroot/dbobject/xpathWhatareTemplateQueriesTheseareXMLdocumentsthatdefinequeriesCanbebounddirectlytoStyleSheetsCalledbyreferencingtheXMLdocumentintheURLWhatareTemplateQueriesTemplatehttp://sqlserver/vroot/vnameparamsVnameisacompletepathtothetemplateXMLfileParametersmaybexsl,encoding,orcontenttype;oruserdefined.
ProvidesaneasywaytoperformcomplexquerieswithlittlenetworktrafficWhyuseTemplateQueriesCanusedynamicSQLbutnorestrictionsonwhatisexecutedAutomaticformattingoftheXMLheaderinformationTemplatessimplifytheHTTPrequestTemplateshavebettersupportparametersDefineandUseStyleSheetsCanbeaddedtotheURLXSL=stylesheet.
xslContentType=text/htmlCanbedefinedintheTemplateWhatdoesatemplatequerylooklikeandhowisitrunDEMOAgenda:XMLXDRSchemaXMLViews|UpdategramMappingrelationaldatathroughanXMLschemaWhatisanXMLViewDefinesanXML-formattedviewonthedatabaseAnnotationsspecifytheXMLtorelationaldatabasemappingforcolumnvaluesandrelationshipsUsesXpathtoquerytheXMLViewHowtouseXMLViewshttp://server/vroot/vname/xpathparametersVnameisadirectreferencetotheschemafileXpathisthexpathqueryParametersmaybexsl,encoding,contenttype,oruserdefinedHowdoIselectdatafromanXMLViewDEMOXMLforSQLWebReleaseXMLforSQLWebRelease1UpdateGramsBulkLoadXMLsupportXMLforSQLWebRelease2(July2001)XMLViewswithXSDSupportforDiffGramsClientSideXMLformattingUpdategramSchemamapping,UpdategramsyntaxInserts,Updates,DeletesUsingandblocksPassingParametersWritingDatawithUpdateGramsUpdategrams(example)MiscellaneousDataRetreival:OLAPdatasp_makewebsqlDEMOAgenda:ADOProgrammingMethodsforSQLServer2000XMLHowdoesonewritecomponentsutilizingthenewSELECTFORXMLandIISUtilizeADOFunctionalityCallsmadethroughADOCommandUsesADOStreamObjectRequiresADO2.
6StreamObjectdefinedasapropertyoftheCommandObjectXMLDataplacedintheStreamObjectObtainedusingReadTextADOsupportsXMLRecordsetscanbepersistedtoXMLFileStreamObjectDOMIntegrationIIS5ResponseObjectAlsosupportforADTGAdvancedDataTableGramformatSupportHierarchicalRecordsetsADOXMLStreamSupportCanpersistdirectlytoanADOStreamObjectXMLextractedusingStreamReadTextXMLdatacanthenbeutilizedinmemoryPassXMLbacktoclientTransformtoHTMLusingXSLADOandDOMIntegrationCanpersistXMLdirectlyintotheXMLDOMDocumentRecordset.
SaveMSXML.
DOMDocument,adPersistXMLCanperformdirectXSLtransformforHTMLbasedcomponentsADOandIIS5ResponseResponseObjectexposesandIStreamInterfaceRecordset.
SaveResponse,adPersistXMLDisplaysXMLinbrowserAvoidsexpensivediskoperationsADOXMLProgrammingDEMOForfurtherInformationXMLwebsitehttp://msdn.
microsoft.
com/xmlSQLServer2000andIIShttp://msdn.
microsoft.
com/msdnmag/issues/0300/sql/sql.
aspSQLServer2000http://www.
microsoft.
com/sqlADOhttp://www.
microsoft.
com/adoFeedback/Questions
无忧云官网无忧云怎么样 无忧云服务器好不好 无忧云值不值得购买 无忧云,无忧云是一家成立于2017年的老牌商家旗下的服务器销售品牌,现由深圳市云上无忧网络科技有限公司运营,是正规持证IDC/ISP/IRCS商家,主要销售国内、中国香港、国外服务器产品,线路有腾讯云国外线路、自营香港CN2线路等,都是中国大陆直连线路,非常适合免北岸建站业务需求和各种负载较高的项目,同时国内服务器也有多个BGP以及高...
vollcloud LLC首次推出6折促销,本次促销福利主要感恩与回馈广大用户对于我们的信任与支持,我们将继续稳步前行,为广大用户们提供更好的产品和服务,另外,本次促销码共限制使用30个,个人不限购,用完活动结束,同时所有vps产品支持3日内无条件退款和提供免费试用。需要了解更多产品可前往官网查看!vollcloud优惠码:VoLLcloud终生6折促销码:Y5C0V7R0YW商品名称CPU内存S...
以前我们在参与到云服务商促销活动的时候周期基本是一周时间,而如今我们会看到无论是云服务商还是电商活动基本上周期都要有超过一个月,所以我们有一些网友习惯在活动结束之前看看商家是不是有最后的促销活动吸引力的,比如有看到阿里云年中活动最后一周,如果我们有需要云服务器的可以看看。在前面的文章中(阿里云新人福利选择共享性N4云服务器年79.86元且送2月数据库),(LAOZUO.ORG)有提到阿里云今年的云...
sqlserver2000挂起为你推荐
全国企业信息查询想查一个企业的信息,哪个网站提供信息查询?人人视频总部基地落户重庆迁户口入重庆连接cuteftp灌水机谁知道哪个好点的灌水机的地址?如何发帖子怎么发帖啊最土团购程序公司要开设一个团购项目,应该如何运作?社区动力如何建立一个论坛?就是社区动力discuz论坛 这个discuz!是不是一个软件?关于建立论坛给个系统的的教正在跳转电影空间如何把空间自带的三级域名跳转到主域名上?管理员密码路由器管理员密码6位discuz7 2discuz X2.5帖子中图片位置 discuz X2.5论坛中发布帖子,上传图片,图片的位置全部都在文章下面
深圳虚拟主机 上海服务器租用 北京主机租用 工信部域名备案查询 域名交易网 sharktech t牌 tier 我爱水煮鱼 申请个人网站 isp服务商 能外链的相册 yundun 太原联通测速 云营销系统 东莞服务器托管 中国域名 美国vpn代理 优惠服务器 so域名 更多