¡¡¡¡rs.Close 'Õâ¸ö·½·¨ÓÃÀ´¹Ø±ÕÄãËù´ú¿ªµÄ±í£¬Èç¹û²»Ê¹ÓÃÕâ¸ö·½·¨Ò²¿ÉÒÔ£¬µ«ÊÇÊý¾Ý¿âÈÔÈ»ÈÏΪÄãÔÚ¶Ô±ê½øÐÐËø¶¨£¬¿ÉÔì³ÉÊý¾Ý¿â¸ºµ£¹ýÖØ
2¡¢¶ÔÊý¾Ý½øÐÐɸѡºÍÅÅÐò
=======================
Sql = "select * from ±íÃû" 'SQL²éѯÓï¾ä
'ÒÔÉÏΪ´ò¿ªÒ»¸ö±íµÄËùÓÐÄÚÈÝ
Sql = "select top 50 * from ±íÃû" 'SQL²éѯÓï¾ä
'ÒÔÉÏΪֻ´ò¿ªÇ°50ÐеļǼ
Sql = "select top 50 ÁÐÃû1,ÁÐÃû2,ÁÐÃû5 from ±íÃû" 'SQL²éѯÓï¾ä
'ÒÔÉÏΪֻ´ò¿ªÇ°50ÐеļǼ£¬²¢ÇÒÖ»´ò¿ªµÚ1¡¢2¡¢5ÁÐÊý¾Ý
Sql = "select * from ±íÃû where ÁÐÃû1='" & ×ֶΠ& "'" 'SQL²éѯÓï¾ä
'ÒÔÉÏΪһ¸ö¼òµ¥µÄɸѡ£¬±íʾ´ò¿ªµÄÄÚÈݱØÐë·ûºÏ[ÁÐÃû1='" & ×ֶΠ& "'"]µÄÄÚÈÝ
'ÐèҪעÒâµÄÊÇ£¬Êý¾Ý¿âÁеÄÀàÐͱØÐëÆ¥Å䣬±ÈÈç×Ö·û´®ÀàÐÍÐèÒªÒÔµ¥ÒýºÅÀ¨Æð
'¶øÊý×ÖÀàÐÍÔò²»ÄÜÓõ¥ÒýºÅÀ¨Æð
'ÁíÍâSQLÓï¾ä»¹Ö§³ÖͨÅä·û£¬ÀýÈç ÁÐÃû1 like '%" & ×ֶΠ& "%'" ±íʾ°üº¬[×Ö¶Î]
'ÔÚ±í´ïʽÖеÄÆ¥Åä
'? _£¨Ï»®Ïߣ© Èκε¥Ò»×Ö·û
'* or % Áã¸ö»ò¶à¸ö×Ö·û
'# Èκε¥Ò»Êý×Ö£¨0 ¡ª 9£©
'[charlist] ÈκÎÔÚ×Ö·û±íÖеĵ¥Ò»×Ö·û
'[!charlist] Èκβ»ÔÚ×Ö·û±íÖеĵ¥Ò»×Ö·û
'×¢£º¸ù¾ÝÊý¾Ý¿âµÄ²»Í¬?¡¢_ºÍ*¡¢%µÄÓ¦ÓÃÓÐËù²î±ð£¬±ÈÈçSQLֻʹÓÃ% ºÍ _ ·Ö±ð´ú±í¶à¸ö×Ö·ûºÍµ¥Ò»×Ö·û
Sql = "select * from ±íÃû where ÁÐÃû1='" & ×ֶΠ& "' ORDER BY ×Ö¶Î1 ASC" '¶Ô²éѯ½á¹û½øÐÐÉýÐòÅÅÁÐ
Sql = "select * from ±íÃû where ÁÐÃû1='" & ×ֶΠ& "' ORDER BY ×Ö¶Î1 DESC" '¶Ô²éѯ½á¹û½øÐнµÐòÅÅÁÐ
Sql = "select * from ±íÃû where ÁÐÃû1='" & ×ֶΠ& "' ORDER BY ×Ö¶Î1 DESC, ORDER BY ×Ö¶Î2 DESC" '¶Ô²éѯ½á¹û½øÐжàά½µÐòÅÅÁУ¨ËÙ¶ÈÆæÂý£¬²»ÍƼöʹÓã©
3¡¢Recordset¼¯ºÏµÄ³£ÓÃÊôÐÔ·½·¨
==============================
rs.BOF 'ÊÇ·ñÓαêÔÚ×îÉϱß
rs.EOF 'ÊÇ·ñÓαêÔÚ×îϱß
rs.RecordCount '¼Ç¼¼¯µÄÐÐÊý£¨Èç¹ûʹÓÃÏñÇ°ÀàÐ͵ÄÓα꣬¿ÉÄÜ·µ»Ø²»×¼È·£©
rs.AddNew 'н¨Ò»ÐмǼ
rs.Update '±£´æµ±Ç°Ðб»Ð޸ĵļǼ
rs.Delete 'ɾ³ýµ±Ç°ÐÐ
rs.Close '¹Ø±Õ¼Ç¼¼¯
4¡¢Fields¼¯ºÏµÄһЩÊôÐԵĽâÊÍ
=============================
'ÒÔÏÂΪ¼òд£¬Õý³£Çé¿öÐèÒªrs.Fileds.¡£¡£¡£µ«ÊÇFieldsÊôÓÚRecordsetµÄÒ»¸öĬÈϼ¯ºÏ£¬Òò´Ë¿ÉÒÔÊ¡ÂÔ
rs() 'À¨ºÅÄÚ¿ÉÒÔÊÇÁÐÃûÒ²¿ÉÒÔÊÇÁеÄÐòºÅÀýÈ磺rs("ÐÕÃû")¡¢rs(3) ¶¼ÊÇÊÇ¿ÉÒÔµÄ
rs(3).Name '·µ»ØÁÐÃû
rs(3).Type '·µ»ØÁеÄÀàÐÍ
rs(3).Value '·µ»Øµ±Ç°ÐеÄÖµ
rs.Fields.Count '·µ»ØÁÐÊý