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
点击进入亚云官方网站(www.asiayun.com)公司名:上海玥悠悠云计算有限公司成都铂金宿主机IO测试图亚洲云Asiayun怎么样?亚洲云Asiayun好不好?亚云由亚云团队运营,拥有ICP/ISP/IDC/CDN等资质,亚云团队成立于2018年,经过多次品牌升级。主要销售主VPS服务器,提供云服务器和物理服务器,机房有成都、美国CERA、中国香港安畅和电信,香港提供CN2 GIA线路,CE...
至今为止介绍了很多UCLOUD云服务器的促销活动,UCLOUD业者以前看不到我们的个人用户,即使有促销活动,续费也很少。现在新用户的折扣力很大,包括旧用户在内也有一部分折扣。结果,我们的用户是他们的生存动力。没有共享他们的信息的理由是比较受欢迎的香港云服务器CN2GIA线路产品缺货。这不是刚才看到邮件注意和刘先生的通知,而是补充UCLOUD香港云服务器、INTELCPU配置的服务器。如果我们需要他...
目前在标准互联这边有两台香港云服务器产品,这不看到有通知到期提醒才关注到。平时我还是很少去登录这个服务商的,这个服务商最近一年的促销信息比较少,这个和他们的运营策略有关系。已经从开始的倾向低价和个人用户云服务器市场,开始转型到中高端个人和企业用户的独立服务器。在这篇文章中,有看到标准互联有推出襄阳电信高防服务器100GB防御。有三款促销方案我们有需要可以看看。我们看看几款方案配置。型号内存硬盘IP...
sqlserver2000挂起为你推荐
http500http 550错误美要求解锁iPhone苹果美版有锁和无锁的区别sns网站有哪些有趣的SNS网站有哪些宜人贷官网宜人财富怎么样?curl扩展大神帮忙看下centos 7.2 系统 php7.0.12的 curl 扩展怎么开启,谢谢啦可信网站可信网站 是自己去注册的还是由做网站 的人帮弄的?如何发帖子请问在网上发帖子怎么发?powerbydedecms如何去掉底部的 powered by dedecms开源网店系统国内有哪些好的java开源电子商城系统店铺统计淘宝店运营每天需要统计哪些数据,我要做个表格
免费国内空间 泛域名 景安vps warez 132邮箱 pw域名 免费ddos防火墙 免费ftp站点 嘟牛 蜗牛魔方 腾讯云分析 789电视 电信虚拟主机 net空间 cdn服务 国外代理服务器 asp.net虚拟主机 电脑主机配置 主机托管 sockscap教程 更多