真的没人懂吗

xiaowangzi 2002-08-27 11:20:45
XML模板文件:
<?xml version ='1.0' encoding='UTF-8'?>
<Northwind xmlns:sql="urn:schemas-microsoft-com:xml-sql" sql:xsl="getxsl.xsl">
<sql:header>
<sql:param name='id'></sql:param>
<sql:param name='name'></sql:param>
<sql:param name='job'></sql:param>
<sql:param name='address'></sql:param>
</sql:header>
<sql:query>
SELECT *
FROM test
where h_DocumentID=@id and h_Sendto=@name and h_Job=@job and h_Address=@address FOR XML AUTO
</sql:query>
</Northwind>
我现在想当SQL语句查询的时候数据库里有符合条件的记录返回一个值,没有符合的记录的话返回另一个值!怎么来做?
...全文
31 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2002-08-27
  • 打赏
  • 举报
回复
how are you posting the xml to the database? if you are using Microsoft.XMLHTTP, you can certainly analyze the response, or you can attach a xsl file to the above query to transform the returning xml

or you can use a stored procedure to get the return value, see
How To: Get return value from a stored procedure.
http://sqlxml.org/faqs.aspx?40

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧