Mssql2005 xml ²éѯ ʹÓà exist - .NET¼¼Êõ / C#
SQL code:
@uid int
@money float
If not exists(SELECT null from bc_users_table where bet_id=@uid and bet_hk_rationing.exist('/root/items[@straight_bet>'+@money+']') = 1)
--BEGIN
select '1111¡®
--RETURN
END
exist ²ÎÊý 1 ±ØÐëΪ ÖÐÎÄ×Ö·û£¿
ÄÄλÅóÓÑÓöµ½¹ýÏàͬÎÊÌâ °ïæ½â´ðÒ»ÏÂ
http://topic.csdn.net/u/20100407/11/472586ae-1b77-4045-aa21-f7d1d011ad0c.html
лл£¬µ«ÊǺÃÏñÎ޹صÄàÞ
exist Õâ¸öÊÇ×Ô¶¨Ò庯Êý°É
°ÑÄǺ¯ÊýÌù³öÀ´ ¿´¿´ËûÐèÒª´«ÄÄЩ²ÎÊý
Ïà¹ØÎÊ´ð£º
txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔÊý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......
<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......
Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
ÎÒÓÐÒ»¸öÀàËƵÄxmlµÄ string£¬Ïëͨ¹ý±éÀúÔõô¸öxml Êä³öÎÒÏëÒªµÄelementµÄÖµ
xml Ϊ£º
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_ME ......
ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À²®ÎĵÄ×Ö¿âÄãÓÐô£¿
ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......