StrSQL="Select * from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis
ÈçºÎ»ñÈ¡ËûµÄ¼Ç¼Êý?@@ROWCOUNT Select count(*) from StrSQL="Select count(*) from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis count(1) ²»Ã÷°×°¡ ¶¥ StrSQL="Select COUNT(*) from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis ÔÚ³ÌÐòÖÐÕâÑùÓà ¿´Â¥Ö÷µÄÓï¾ä,Ó¦¸ÃÊÇÔÚ¿ª·¢³ÌÐòʱʹÓÃado¶ÔÏóÁ¬½ÓsqlÈ»ºó·µ»ØÊý¾ÝµÄ°É,Èç¹ûÊÇÕâÑù,ÄÇôado¶ÔÏ󶼻áÓÐÒ»¸öÊôÐÔ±êʶÕâ´Î²Ù×÷·µ»ØÁ˶àÉÙÐмǼµÄ.Èç¹ûÖ±½ÓÔÚsqlÀïÔËÐÐ,ÄÇô¿ÉÒÔÓÃϵͳ±äÁ¿@@rowcountÀ´È¥µÄ¼Ç¼Êý.
declare @rows int select * from ±íÃû where Ìõ¼þ set @rows = @@rowcount select @rows Õâ¶Î´úÂë¾ÍÄÜ·µ»ØËù²éѯµÄ¼Ç¼ÊýÁË. StrSQL="Select count(*) from "&DataTable&" Where ID In("& ID &") and Shop_ID="&Shop_ID&Taxis Á½ÖÖ¶¼¿ÉÒÔ£º 1.Count(*) 2.@@Rowcount
´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......