以前在介绍SQL2k的时候已经提到了SQL2k对XML的支持,使用for XML语句就可以很容易的把执行的结果转化为一个XML,这样可以在很大程度上提高系统运行效率和开发速度,详细的内容请参见Books Online。
但是在使用ADO(Required ADO 2.6)访问返回的XML的方式和原来的Recordset是有所不同的。如果你还是使用Recordset访问的话,只能得到一个Unicode格式的XML Schema,而无法得到XML的内容。
其实这个问题也是很容易就能解决的,只是我自以为很熟悉ADO,没有仔细看Help,所以没有发现ADO是采用Stream的方式来得到和返回XML的。
Command 对象有两个属性,叫Input Stream和Output Stream,属性的值是一个IUnknown接口。可以把一个XML Parser的接口赋给它,或者是直接用Request、Response等。这样的好处是不需要再去生成一个Recordset,不需要去保存这些数据,从而节省了系统开销。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
