使用 FOR XML Auto 生成 XML
考虑 SQL Server 2000 中返回 XML 的此查询。
select * from Mytable employee for xml auto , elements
我正在尝试使用经典 ASP 创建 XML 文件。
查询的结果是使用记录集对象获取的。结果是一行一列。
生成的 xml 文件仅包含前 2 行或 255 个字符。
我如何使其不受限制?
有没有办法从 SQL Server 2000 获取多行格式的 XML?
这是asp代码
dim sql dim rs
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment;filename="& filename
set rs = server.createobject("adodb.recordset")
sql = "select * from Mytable employee for xml auto , elements"
set rs = con.execute(sql)
response.write "<?xml version=""1.0""?>"
response.write rs(0)
Consider this query in SQL Server 2000 returning XML.
select * from Mytable employee for xml auto , elements
I'm trying to create an XML file using classic ASP.
The results of the query is fetched using a recordset object. Tresult is one row and one column.
The resulting xml file has only first 2 row or 255 characters.
How do i make this unlimited?
Is there a way to obtain XML in multirow format from SQL Server 2000?
Here's the asp code
dim sql dim rs
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment;filename="& filename
set rs = server.createobject("adodb.recordset")
sql = "select * from Mytable employee for xml auto , elements"
set rs = con.execute(sql)
response.write "<?xml version=""1.0""?>"
response.write rs(0)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将你的sql更改为
change your sql to