Access������--
ËùÊô·ÖÀࣺ Êý¾Ý¿âÁ¬½Ó ×÷Õߣº ¹²ïí ¸üÐÂÈÕÆÚ£º2003-10-14 8:44:20 ÔĶÁ´ÎÊý£º386

ADOÈý´ó¶ÔÏóµÄÊôÐÔ¡¢·½·¨¡¢Ê¼þ¼°³£Êý£¨Èý£©


Recordset¶ÔÏó

ÊôÐÔ

ÊôÐÔÃû³Æ Êý¾ÝÀàÐͺÍÓÃ;
AbsolutePage ¿É¶ÁдLongÀàÐÍ£¬ÒªÃ´ÊÇÉèÖûò·µ»Øµ±Ç°¼Ç¼Ëù´¦µÄÒ³ÃæÐòºÅ£¬ÒªÃ´ÊÇÒ»¸öPositionEnum³£Êý£¬¼ûAbsolutePageÓõ½µÄ³£Êý¡£ÔÚ»ñÈ¡»òÉèÖÃAbsolutePageµÄֵ֮ǰ£¬±ØÐëÏÈÉ趨PageSizeµÄÖµ¡£AbsolutePageÊÇ´Ó1¿ªÊ¼¼ÆÊýµÄ¡£Èç¹ûµ±Ç°¼Ç¼λÓÚµÚһҳʱ£¬AbsolutePageµÄ·µ»ØֵΪ1£¬¶ÔAbsolutePageÉèÖý«Ê¹µ±Ç°¼Ç¼ָÕëÖ¸ÏòÖ¸¶¨Ò³µÄµÚÒ»Ìõ¼Ç¼¡£
AbsolutePosition* ¿É¶ÁдµÄLongÀàÐÍ£¨´Ó1¿ªÊ¼¼ÆÊý£©£¬ÉèÖûò·µ»Øµ±Ç°¼Ç¼Äê´¦µÄλÖá£AbsolutePositionµÄ×î´óÈ¡ÖµÊÇRecordCountÊôÐÔµÄÖµ¡£
ActiveCommand ¿É¶ÁдµÄStringÀàÐÍ£¬RecordsetËù¹ØÁªµÄÏÈÇ°´ò¿ªµÄCommand¶ÔÏóÃû³Æ
ActiveConnection Ö¸ÕëÀàÐÍ£¬Ö¸ÏòRecordsetËù¹ØÁªµÄÏÈÇ°´ò¿ªµÄConnection¶ÔÏ󣬻òÖ¸ÏòÒ»ÌõÍêÕûÓÐЧµÄConnectionString´®Öµ¡£

BOF* Ö»¶ÁBooleanÀàÐÍ£¬ÈôΪTrue£¬±íÃ÷¼Ç¼ָÕëÒÑλÓÚRecordsetµÚÒ»Ìõ¼Ç¼֮ǰ£¬²¢ÇÒûÓÐÁ˵±Ç°¼Ç¼
Bookmark* ¿É¶ÁдVariantÀàÐÍ£¬·µ»Ø¶ÔÌض¨¼Ç¼µÄÒýÓûòʹÓÃÒ»¸öBookmarkֵʹ¼Ç¼ָÕëÖ¸ÏòÌض¨¼Ç¼
CacheSize* ¿É¶ÁдLongÀàÐÍ£¬Ö¸¶¨±¾µØCacheÖÐËù´æµÄ¼Ç¼ÌõÊý£¬×îС(ĬÈÏÖµ)Ϊ1¡£ÈôÔö¼ÓÁËCacheSizeµÄÖµ£¬ÔòÔÚÁ÷¶¯RecordsetÒÔ»ñÈ¡¸ü¶à¼Ç¼ʱ£¬ÄܼõÉÙÓë·þÎñÆ÷µÄͨÐÅ´ÎÊý¡£
CursorLocation ¿É¶ÁдLongÀàÐÍ£¬Ö¸¶¨¿ÉÁ÷¶¯ÓαêµÄλÖ㬼´CursorTypeÊÇλÓÚ¿Í»§¶Ë»¹ÊÇλÓÚ·þÎñÆ÷¶Ë£¬¼ûCursorLocationÓõ½µÄ³£Êý¡£Ä¬ÈÏÖµÊÇʹÓÃOLE DBÊý¾ÝÔ´ÌṩµÄÓαꡣ
CusrsorType* ¿É¶ÁдLongÀàÐÍ£¬Ö¸¶¨RecordsetÓαêµÄÀàÐÍ£¬¼ûCursorTypeÓõ½µÄ³£Êý£¬Ä¬ÈÏÖµÊÇforward-onlyÓαê
DataMember Ö¸ÕëÀàÐÍ£¬Ö¸Ïò¹ØÁªµÄDataEnvironment.Command¶ÔÏó
DataSource Ö¸ÕëÀàÐÍ£¬Ö¸Ïò¹ØÁªµÄDataEnvironment.Connection¶ÔÏó
EditMode* Ö»¶ÁLongÀàÐÍ£¬·µ»ØRecordsetµÄ±à¼­×´Ì¬£¬¼ûEditModeÓõ½µÄ³£Êý
EOF* Ö»¶ÁBooleanÀàÐÍ£¬ÈôΪTrue£¬±íÃ÷¼Ç¼ָÕëÒѳ¬³öRecordsetµÄ×îºóÒ»Ìõ¼Ç¼£¬²¢ÇÒûÓÐÁ˵±Ç°¼Ç¼¡£
Filter* ¿É¶ÁдVariantÀàÐÍ£¬ÒªÃ´ÊÇÒ»Ìõ¼þ±í´ïʽ£¨Ò»ÌõÓÐЧµÄSQL WHERE×Ӿ䵫ÓÖ²»³öÏÖ±£Áô×ÖWHERE£©£¬ÒªÃ´ÊÇÖ¸ÏòÌض¨¼Ç¼µÄBookmarkÊý×飬ҪôÊÇÒ»¸öFilter³£Êý£¬Ïê¼ûFilterÓõ½µÄ³£Êý¡£
LockType* ¿É¶ÁдLongÀàÐÍ£¬Ö¸¶¨´ò¿ªRecordsetËùʹÓõļǼËø¶¨·½·¨¡£Ä¬ÈÏÖµÊÇÖ»¶Á£¬¶ÔÓ¦ÓÚforward-onlyÓαêµÄÖ»¶ÁÌØÐÔ¡£¼ûLockTypeÊôÐÔÓõ½µÄ³£Êý¡£
MarshalOptions ¿É¶ÁдLongÀàÐÍ£¬Ö¸¶¨¿Í»§¶Ë¸Ä¶¯ºó£¬Ó¦·µ»ØÄĸö¼Ç¼¼¯ºÏ£¬´ËÊôÐÔ½öÊʺÏÓÚ²»³£¼ûµÄADOR.Recordset¶ÔÏ󣬴˶ÔÏóÊÇRDS.ADOR.Recordset¶ÔÏó³ÉÔ±Ö®Ò»¡£
MaxRecords* ¿É¶ÁдLongÀàÐÍ£¬Ö¸¶¨SELECT²éѯ»ò´æ´¢¹ý³Ì·µ»ØµÄ×î´ó¼Ç¼ÌõÊý£¬Ä¬ÈÏֵΪ0£¬¼´È«²¿·µ»Ø
PageCount Ö»¶ÁLongÀàÐÍ£¬·µ»ØRecordsetËùÓеÄÒ³Êý£¬±ØÐëÉ趨ÁËPageSizeµÄÖµ£¬PageCountµÄ·µ»ØÖµ²ÅÊÇÕæÕýÓÐÒâÒåµÄ¡£Èç¹ûRecordset²»Ö§³ÖPageCountÊôÐÔ£¬Ôò·µ»ØֵΪ-1
PageSize ¿É¶ÁдLongÀàÐÍ£¬ÉèÖûò·µ»ØÒ»¸öÂß¼­Ò³Ëù°üº¬µÄ¼Ç¼ÌõÊý¡£Ê¹ÓÃÂß¼­Ò³¿É°Ñ´óµÄRecordset·Ö½âΪ¶à¸öÒ×´¦ÀíµÄС²¿·Ö¡£Í¨³£µÄ×ö·¨ÊÇ°ÑPageSizeÉèΪDataGrid¡¢MsFlexGrid»ò²ã´ÎÐ͵ÄFlexGrid¿Ø¼þËùÄÜÏÔʾµÄ¼Ç¼ÌõÊý¡£PageSizeºÍËø¶¨Jet(2k)»òËø¶¨SQL Server(6.5°æ¼°¸üÔç°æ±¾,2k;7.0°æ£¬8k)Êý¾Ý¿âʱÓõ½µÄ±íÒ³Ãæ´óСÎÞ¹Ø
PersistFormat ¿É¶ÁдLongÀàÐÍ£¬ÉèÖûò·µ»ØÓɵ÷ÓÃSave·½·¨Ëù´´½¨µÄRecordsetÎļþµÄ¸ñʽ¡£µ±Ç°½öÓÐÒ»¸öÖµadPersistADTG(ĬÈϸñʽ£ºAdvanced Data TableGram)
RecordCount* Ö»¶ÁLongÀàÐÍ£¬Èç¹ûRecordsetÖ§³Ö½üËƶ¨Î»»òÖ§³ÖÊéÇ©£¬Ôò·µ»Ø´ø¿ÉÁ÷¶¯ÓαêµÄRecordsetËùº¬ÓеļǼÊý£»Èç¹û²»Ö§³Ö£¬±ØÐëʹÓÃMoveLast·½·¨ÒÔÈ¡µÃȷʵ¸²¸ÇÁËËùÓмǼµÄ׼ȷµÄRecordCountÊýÖµ¡£Èç¹ûforward-onlyÀàÐÍRecordsetÓÐÒ»Ìõ»ò¶àÌõ¼Ç¼£¬Recordset·µ»Ø-1(True),ÈκÎÀàÐ͵ĿյÄRecordset¶¼½«·µ»Ø0(False)
Sort* ¿É¶ÁдStringÀàÐÍ£¬°üº¬Ò»Ìõ²»º¬±£Áô×ÖORDER BYµÄSQL ORDERY BY×Ӿ䣬ÓÃÒÔÖ¸¶¨RecordsetµÄÅÅÐò·½Ê½
Source* ¿É¶ÁдStringÀàÐÍ£¬¿ÉÒÔÊÇSQLÓï¾ä¡¢±íÃû¡¢´æ´¢¹ý³ÌÃû»òÏà¹ØCommand¶ÔÏóÃû¡£Èç¹ûÌṩÁËCommand¶ÔÏóÃû£¬ÔòSource½«·µ»ØCommand.CommandTextµÄÖµ¡£ÀûÓÃOpen·½·¨µÄ²ÎÊýlngOptions¿ÉÒÔÖ¸¶¨Ìṩ¸øSourceÖµµÄÀàÐÍ
State ¿É¶ÁдLongÀàÐÍ£¬Îª¶ÔÏó״̬³£ÊýÖ®Ò»¡£¼ûState³£Êý
Status Ö»¶ÁLongÀàÐÍ£¬±íÃ÷¶ÔRecordset½øÐÐÅú´¦Àí»òÆäËû¶à¼Ç¼(bulk)²Ù×÷ºóµÄ״̬¡£¼ûStatusÊôÐÔÓõ½µÄ³£Êý

×¢Ò⣺ÉϱíËùÁÐÊôÐÔÊÇADODB.Recordset¶ÔÏóµÄ±ê×¼ÊôÐÔ£¬¼´ÄÇЩ±»¹ØϵÊý¾Ý¿âµÄ´ó¶àÊýͨÓÃOLE DBÊý¾ÝÌṩÕßËùÖ§³ÖµÄÊôÐÔ¡£´øÐǺŵÄÊôÐÔ±íʾËüÓëDAO.Recordset»òrdoResultset¶ÔÏóµÄÏàÓ¦ÊôÐÔÍêÈ«Ò»Ñù»òºÜ½Ó½ü¡£

·½·¨

·½·¨ ÓÃ;
AddNew* Ïò¿É¸üеÄRecordsetÌí¼ÓÒ»ÌõмǼ¡£µ÷ÓÃÓ﷨ΪrstName.AddNew[{varField|avarFields},{varValue|avarValuese}],ÆäÖÐvarFieldÊǵ¥¸ö×Ö¶ÎÃû£¬avarFieldsÊÇ×Ö¶ÎÃûÊý×é¡£varValueÊǵ¥¸ö×Ö¶ÎÖµ£¬avarValueÊÇÓÉavarFieldsÖ¸¶¨×ֶεÄÖµËù×é³ÉµÄÊý×é¡£µ÷ÓÃUpdate·½·¨Ôò°ÑмǼ¼Óµ½Êý¾Ý¿âµÄ±íÖС£Èç¹ûÏòÖ÷¹Ø¼ü×Ö²»ÊǵÚÒ»¸ö×ֶεÄRecordsetÖÐÌí¼Ó¼Ç¼£¬Ôò±ØÐëÔÚAddNew·½·¨ÖÐÖ¸¶¨Ö÷¹Ø¼ü×ÖµÄÃû³ÆºÍÖµ
Cancel È¡ÏûÒì²½²éѯµÄÖ´ÐУ¬ÖÐÖ¹´æ´¢¹ý³Ì»ò¸´ºÏSQLÓï¾ä´´½¨¶à¸öRecordset£¬µ÷ÓÃÓ﷨ΪrstName.Cancel
CancelBatch* È¡ÏûLockEditֵΪBatchOptimisticµÄRecordsetµÄ¼´½«ÉúЧµÄÅúÁ¿¸üвÙ×÷£¬µ÷ÓÃÓ﷨Ϊ£ºrstName.CancelBatch [lngAffectRecords],¿ÉÑ¡²ÎÊýlngAffectRecordsµÄÈ¡Öµ¼ûlngAffectRecordsÓõ½µÄ³£Êý
Clone ¸´ÖÆÒ»¸ö´øÓжÀÁ¢¼Ç¼ָÕëµÄRecordset¶ÔÏ󣬵÷ÓÃÓ﷨Ϊ£ºSet rstDupe=rstName.Clone()
Close ¹Ø±ÕRecordset¶ÔÏó£¬ÒÔºó¿ÉÒÔÖØÐÂÉèRecordsetµÄÊôÐÔ²¢Ê¹ÓÃOpen·½·¨À´ÔٶȷÃÎÊRecordset ¡£µ÷ÓÃÓ﷨Ϊ:rstName.Close
Delete* Èç¹ûRecordsetµÄLockEditÊôÐÔֵδÉèΪadLockBatchOptimistic£¬Á¢¿Ì´ÓRecordsetºÍÏàÓ¦±íÖÐɾ³ýµ±Ç°¼Ç¼
Find Ñ°ÕÒÂú×ãÖ¸¶¨Ìõ¼þµÄ¼Ç¼¡£µ÷ÓÃÓ﷨Ϊ£ºrstName.Find strCriteria [,lngSkipRecords, lngSearchDirection [,lngStart]],ÆäÖÐstrCriteriaÊDz»º¬WHERE¹Ø¼ü×ÖµÄSQL WHERE×Ӿ䣬¿ÉÑ¡²ÎÊýlngSkipRecordsÊÇÓ¦ÓÃFindÇ°ËùÌø¹ýµÄ¼Ç¼ÊýÄ¿£¬lngDirectionÖ¸¶¨²éÕÒ·½Ïò(adSearchForward,ºÍadSearchBackward,ÆäÖÐadSearchForwardÊÇĬÈÏÖµ),¿ÉÑ¡²ÎÊýlngStartÖ¸¶¨ÁË´ÓÄĶù¿ªÊ¼²éÕÒ£¬ÆäֵҪôÊÇÒ»¸öBookmarkÖµ£¬ÒªÃ´ÊÇBookmark³£Êý£¬¼ûvarStart²ÎÊýÓõ½µÄBookmark³£Êý¡£
GetRows ·µ»ØÒ»¸ö¶þάVariantÊý×飨ÐС¢ÁУ©£¬µ÷ÓÃÓ﷨Ϊavarname=rstName.GetRows(lngRows [,varStart[,{strFieldName|lngFieldIndex|avarFieldNames|avarFieldIndexes}]],ÆäÖÐlngRowsÊÇ·µ»Ø¼Ç¼ÐÐÊý£¬varStartÖ¸¶¨´ÓÄĶù¿ªÊ¼²éÕÒ£¬ÆäֵҪôÊÇÒ»¸öBookmarkÖµ£¬ÒªÃ´ÊÇBookmark³£Êý£¬¼ûvarStart²ÎÊýÓõ½µÄBookmark³£Êý¡£µÚÈý¸ö²ÎÊý¿ÉÒÔÊǵ¥¸öÁУ¨×ֶΣ©µÄÃû³Æ»òË÷Òý£¬Ò²¿ÉÒÔÊǶà¸öÁÐÃû³Æ»òË÷Òý×é³ÉµÄVariantÊý×é¡£Èç¹û²»Ö¸¶¨µÚÈý¸ö²ÎÊý£¬GetRows·µ»ØRecordsetÖÐËùÓÐÁС£
GetString ĬÈÏÇé¿öÏ£¬·µ»ØÖ¸¶¨ÊýÄ¿¼Ç¼µÄString´®Öµ£¬¼Ç¼¼äÓÉ·µ»Ø´úÂë·Ö¸ô¡£¼Ç¼ÄÚÓÉtab·Ö¸ô¡£µ÷ÓÃÓ﷨Ϊ£º strClip=rstname.GetString(lngRows,[, strCloumnDelimiter[,strRowDelimiter,[strNullExpr]]])¡£ÆäÖÐlngRowsΪ·µ»Ø¼Ç¼ÐÐÊý£¬strColumnDelimiterΪ¿ÉÑ¡µÄÁзָô·û(vbTabÊÇĬÈÏÖµ),strRowDelimiterÊÇ¿ÉÑ¡µÄÐзָô·û(vbCrÊÇĬÈÏÖµ)£¬strNullExprÊÇ¿ÉÑ¡²ÎÊý£¬ÓÃÓÚÅöµ½NullֵʱµÄÌæ´úÖµ£¨Ä¬ÈÏÖµÊÇ¿Õ×Ö·û´®£©¡£GetStringµÄÖ÷ÒªÓÃ;ÊÇͨ¹ý°Ñ¿Ø¼þµÄClipÊôÐÔÉèΪstrClipÀ´´¦ÀíMSFlexGrid»òMSHFlexGrid¿Ø¼þ
Move* ´Óµ±Ç°¼Ç¼Òƶ¯¼Ç¼ָÕë¡£µ÷ÓÃÓ﷨Ϊ£ºrstName.Move lngNumRecords [, varStart],ÆäÖÐlngNumRecordsÊÇÒªÌø¹ýµÄ¼Ç¼Êý£¬¿ÉÑ¡Ñ¡²ÎÊývarStartÖ¸¶¨´ÓÄÄ¿ªÊ¼Òƶ¯¡£ÆäֵҪôÊÇÒ»¸öBookmarkÖµ£¬ÒªÃ´ÊÇBookmark³£Êý£¬¼ûvarStart²ÎÊýÓõ½µÄBookmark³£Êý¡£
MoveFirst* Òƶ¯¼Ç¼ָÕëµ½µÚÒ»Ìõ¼Ç¼£¬µ÷ÓÃÓ﷨Ϊ£ºrstName.MoveFirst
MoveLast* Òƶ¯¼Ç¼ָÕëµ½×îºóÒ»Ìõ¼Ç¼£¬µ÷ÓÃÓ﷨Ϊ£ºrstName.MoveLast
MoveNext Òƶ¯¼Ç¼ָÕëµ½ÏÂÒ»Ìõ¼Ç¼£¬µ÷ÓÃÓ﷨Ϊ£ºrstName.MoveNext¡£ËüÊÇÄÜÓÃÓÚforward-only RecordsetµÄΨһMove·½·¨
MovePrevious* Òƶ¯¼Ç¼ָÕ뵽ǰһÌõ¼Ç¼£¬µ÷ÓÃÓ﷨Ϊ£ºrstName.MovePrevious
NextRecordset ·µ»ØÁíÍâµÄRecordset,Ëüͨ³£ÓÉÄܲúÉú¶à¸öRecordsetµÄ¸´ºÏSQLÓï¾ä(ÈçSELECT * FROM orders;SELECT * FROM customers)»ò´æ´¢¹ý³ÌÀ´´´½¨¡£µ÷ÓÃÓ﷨ΪNext=rstName.NextRecordset [(lngRecordsAffected)],ÆäÖпÉÑ¡²ÎÊýlngRecordsAffectedÖ¸¶¨·µ»Øµ½rstNextÖÐÈ¥µÄ¼Ç¼ÊýÄ¿¡£Èç¹ûÒѲ»´æÔÚRecordset£¬rstNext±»ÉèΪNothing
Open ÔÚÒ»¸ö»î¶¯Command»òConnection¶ÔÏóÉÏ´ò¿ªÒ»¸öRecordset£¬µ÷ÓÃÓ﷨Ϊ£ºrstName.Open [varSource [, varActiveConnection [, lngCursorType [, lngLockType [, lngOptions]]]]]¡£ÕâЩ²ÎÊý¶¼ÊÇ¿ÉÑ¡µÄ£¬
Requery ÖØдӱíÖлñÈ¡RecordsetµÄÄÚÈÝ£¬µÈЧÓÚCloseºóÔÙOpen¡£ËüÊÇÒ»¸ö×ÊÔ´¼¯ÖÐÐͲÙ×÷¡£Ó﷨Ϊ£ºrstName.Requery
Resync* ÖØдӱíÖлñÈ¡²¿·ÖRecordsetÄÚÈÝ¡£µ÷ÓÃÓ﷨ΪrstName.Resync [lngAffectRecords],ÆäÖÐlngAffectRecordsµÄÈ¡Öµ¼ûlngAffectRecordsÓõ½µÄ³£Êý¡£Èç¹û°Ñ¸Ã²ÎÊýÉèΪadAffectCurrent»òadAffectGroup£¬Ôò±ÈadAffectAll(ĬÈÏÖµ)ËùºÄµÄ×ÊÔ´ÒªÉÙ¡£
Save ´´½¨°üº¬RecordsetÓÀ¾ÃÐÔ¿½±´µÄÎļþ¡£µ÷ÓÃÓ﷨ΪrstName.Save strFileName¡£ÆäÖÐstrFileNameΪ·¾¶ºÍÎļþÃû¡£Í¨³£ÓÃ.rst×÷ΪÎļþµÄÀ©Õ¹Ãû¡£
Supports Èç¹ûÊý¾ÝÌṩÕßÖ§³ÖÖ¸¶¨µÄÓαêÏà¹ØµÄ·½·¨£¬Ôò·µ»ØTrue£¬·ñÔò·µ»ØΪFalse¡£µ÷ÓÃÓ﷨ΪSupported=rstname.Supports (lngCursorOptions).¹ØÓÚlngCursorOptions,¼ûSupports·½·¨Óõ½µÄ³£Êý¡£
Update* ʹ¶ÔRecordsetµÄÐ޸ĶԵײãÊý¾ÝÔ´ÖеıíÉúЧ¡£¶ÔÓÚÅúÁ¿²Ù×÷£¬Update·½·¨Ö»Ê¹Ð޸ĶԱ¾µØ(Cached)RecordsetÉúЧ¡£µ÷ÓÃÓ﷨ΪrstName.Update
UpdateBatch* ºÏ¶ÔÖ¸Á¿ÀàÐ͵ÄRecordset(LockTypeÊôÐÔֵΪadBatchOptimistic,CursorTypeÊôÐÔֵΪadOpenKeyset»òadOpenStatic)Ëù×öµÄÐ޸ĶԵײãÊý¾ÝÔ´ÖеıíÉúЧ¡£µ÷ÓÃÓ﷨ΪrstName.UpdateBatch [lngAffectRecords],ÆäÖÐlngAffectRecordsµÄÈ¡Öµ¼ûlngAffectrecordsÓõ½µÄ³£Êý¡£

×¢£ºADODB.Recordset¶ÔÏó²»Ö§³ÖEdit·½·¨¡£ÎªÁ˸ıäADODB.Recordset¶ÔÏóµ±Ç°¼Ç¼µÄÒ»¸ö»ò¶à¸ö×ֶεÄÖµ£¬¿ÉÒÔÏÈʹÓÃrstName.Fields(n).Value=varValue°ÑÏàÓ¦×ֶεÄÖµ¸ÄΪËùÐèÒªµÄÖµ£¬¶øºóÖ´ÐÐrstName.Update¼´¿É¡£

ʼþ

ʼþÃû³Æ ´¥·¢Ê±»ú
EndOfRecordset ¼Ç¼ָÕëÊÔͼÒƵ½×îºóÒ»Ìõ¼Ç¼֮Íâʱ
FieldchangeComplete ×Ö¶ÎÖµµÄ¸Ä±äÍê³ÉÖ®ºó
MoveComplete Move»òMove...·½·¨Ö´ÐÐÖ®ºó
RecordsChangeComplete ¶Ôµ¥¸ö¼Ç¼±à¼­Íê³ÉÒÔºó
RecordsetChangeComplete »º´æÖеĸıä¶Ôµ×²ã±íÉúЧ֮ºó
WillChangField ¶Ô×Ö¶ÎÖµ¸Ä±ä֮ǰ
WillChangeRecord ¶Ôµ¥¸ö¼Ç¼¸Ä±ä֮ǰ
WillChangeRecordset »º´æÖеĸıä¶Ôµ×²ã±íÉúЧ֮ǰ
WillMove Move»òMove...·½·¨Ö´ÐÐ֮ǰ

×¢£ºÊ¼þ´¦ÀíÄ£¿éµÄº¯ÊýÍ·¼¸ºõ¶¼Óõ½ÁËadReason²ÎÊý¡£¸Ã²ÎÊýµÄÈ¡Öµ¼ûadReason²ÎÊýÓõ½µÄ³£Êý¡£

³£Êý

AbsolutePageÊôÐÔÓõ½µÄ³£Êý

³£Êý º¬Òå
adPosUnknown Êý¾ÝÌṩÕß²»Ö§³ÖÒ³Ã棬RecordsetΪ¿Õ£¬»òÊý¾ÝÌṩÕß²»ÄÜÈ·¶¨Ò³Âë¡£
adPosBOF ¼Ç¼ָÕ붨λÓÚÎļþ¿ªÍ·£¨BOFÊôÐÔֵΪTrue£©
adPosEOF ¼Ç¼ָÕ붨λÓÚÎļþ½á⣨EOFÊôÐÔֵΪTrue£©

CursorLocationÊôÐÔÓõ½µÄ³£Êý

³£Êý º¬Òå
adUseClient ʹÓÿͻ§¶ËÓαê¿âÌṩµÄÓαꡣADODB.RecordsetÒªÇó¿Í»§¶ËÓαê
adUseServer ʹÓÃÊý¾ÝÔ´ÌṩµÄÓα꣬ͨ³££¨µ«·Ç¾ø¶Ô£©Î»ÓÚ·þÎñÆ÷ÉÏ£¨Ä¬ÈÏÖµ£©

CursorTypeÊôÐÔÓõ½µÄ³£Êý

³£Êý º¬Òå
adOpenForwardonly Ìṩµ¥ÏòÒƶ¯ÓαêºÍÖ»¶ÁRecordset£¨Ä¬ÈÏÖµ£©
adOpenDynamic Ìṩ¿É¹ö¶¯Óα꣬¿ÉÏÔʾÆäËûÓû§¶ÔRecordsetËù×öµÄ¸Ä¶¯£¨°üÀ¨Ìí¼ÓмǼ£©
adOpenKeyset Ìṩ¿É¹ö¶¯Óαֻ꣬Òþ²ØÆäËûÓû§Ëù×öµÄ¸Ä¶¯£¬ÀàËÆÓÚdynasetÀàÐ͵ÄDAO.Recordset
adOpenStatic Ìṩһ¸öλÓÚRecordset¾²Ì¬¿½±´ÉϵĿɹö¶¯Óα꣬ÀàËÆÓÚsnapshotÀàÐ͵ÄDAO.Recordset£¬µ«¶àÁ˿ɸüÐÂÌØÐÔ

EditModeÊôÐÔÓõ½µÄ³£Êý

³£Êý º¬Òå
adEditNone ÎÞÕýÔÚ½øÐеı༭²Ù×÷(ĬÈÏÖµ)
adEditAdd ÁÙʱÌí¼ÓÒ»Ìõ¼Ç¼£¬µ«ÉÐδ´æÈëÊý¾Ý¿âµÄ±íÖÐ
adEditInProgress µ±Ç°¼Ç¼ÖеÄÊý¾ÝÒѾ­¸Ä¶¯£¬µ«ÉÐδ´æÈëÊý¾Ý¿âµÄ±íÖÐ

FilterÊôÐÔÓõ½µÄ³£Êý

³£Êý º¬Òå
adFilterNone ³ýÈ¥ÒÑÓеĹýÂËÆ÷£¬ÏÔʾRecordsetÖеÄËùÓмǼ£¨µÈЧÓÚ°ÑFilterÊôÐÔÖÃΪ¿Õ´®£¬Ä¬ÈÏÖµ£©
adfilterAffectedRecords Ö»ÏÔʾÉÏ´ÎCancelBatch¡¢Delete¡¢Resync»òUpdateBatch·½·¨Ö´ÐкóËùÓ°ÏìµÄ¼Ç¼
adFilterFetchedRecords Ö»µ±Ç°CacheÖеļǼ£¬¼Ç¼ÌõÊýÓÉCacheSizeÀ´È·¶¨
adFilterPendingRecords Ö»ÏÔʾÒѸĶ¯µ«ÉÐδ±»Êý¾ÝÔ´´¦ÀíµÄ¼Ç¼£¨½öÊÊÓÃÓÚÅúÁ¿¸üÐÂģʽ£©

LockTypeÊôÐÔÓõ½µÄ³£Êý

³£Êý º¬Òå
adLockRecordOnly Ö¸¶¨Ö»¶Á·ÃÎÊ£¨Ä¬ÈÏÖµ£©
adLockBatchOptimistic ʹÓÃÅúÁ¿¸üÐÂģʽ¶ø²»ÊÇĬÈϵÄÁ¢¼´¸üÐÂģʽ
adLockOptimistic ʹÓÃÀÖ¹ÛËø£¨½öÔÚ¸üйý³ÌÖвÅËø¶¨¼Ç¼»òÒ³Ã棩
adLockPessimistic ʹÓñ¯¹ÛËø£¨±à¼­»ò¸üÐÂÕû¸ö¹ý³ÌÖоùËø¶¨¼Ç¼»òÒ³Ã棩

State³£Êý

³£Êý º¬Òå
adStateClosed Connection(»òÆäËû¶ÔÏó)ÊǹرյÄ(ĬÈÏÖµ)
adStateConnecting ÕýÔÚÁ¬½ÓÊý¾ÝÔ´µÄ״̬
adStateExecuting Connection»òCommand¶ÔÏóµÄExecute·½·¨Òѱ»µ÷ÓÃ
adStateFetching ·µ»ØÐÐ(row)µ½Recordset¶ÔÏó
adStateOpen Connection(»òÆäËû¶ÔÏó)ÊÇ´ò¿ªµÄ(»î¶¯µÄ)

StatusÊôÐÔÓõ½µÄ³£Êý(½öÊÊÓÃÓÚBatch»òBulk Recordset²Ù×÷)

³£Êý º¬Òå
adRecOK ³É¹¦¸üÐÂ
adRecNew ³É¹¦Ìí¼Ó
adRecModified ³É¹¦ÐÞ¸Ä
adRecDeleted ³É¹¦É¾³ý
adRecUnmodified Î޸Ķ¯
adRecInvalid δ±£´æ£ºBookmarkÊôÐÔÎÞЧ
adRecMultipleChanges δ±£´æ£º±£´æ»áÓ°ÏìÆäËû¼Ç¼
adRecPendingChanges δ±£´æ£º¼Ç¼ÒýÓÃÁËÒ»¸öµÈ´ý²åÈë²Ù×÷
adRecCanceled δ±£´æ£º²Ù×÷±»È¡Ïû
adRecCantRelease δ±£´æ£ºÏÖÓмǼֵ×èÖ¹Á˱£´æ
adRecConcurrencyViolation δ±£´æ£ºÀÖ¹Û²¢·¢Ëø·¢ÉúÁËÎÊÌâ
adRecIntegrityViolation δ±£´æ£º²Ù×÷»áÓ°ÏìÒ»ÖÂÐÔ
adRecMaxChangesExceeded δ±£´æ£º´æÔÚÌ«¶àµÄµÈ´ý¸Ä¶¯
adRecObjectOpen δ±£´æ£º´ò¿ª´æÖü¶ÔÏó·¢Éú³åÍ»
adRecOutofMemory δ±£´æ£ºÄÚ´æ²»×ã
adRecPermissionDenied δ±£´æ£ºÓû§È¨ÏÞ²»¹»
adRecSchemaViolation δ±£´æ£º¼Ç¼µÄ½á¹¹²»·ûºÏÊý¾Ý¿âÖеĶ¨Òå
adRecDBDeleted δ±£´æ»òɾ³ý£º¼Ç¼Òѱ»É¾³ý

lngAffectRecords²ÎÊýÓõ½µÄ³£Êý

CommandÀàÐͳ£Êý º¬Òå
adAffectAll °üÀ¨Recordset¶ÔÏóµÄËùÓмǼ£¬ÄÇЩ±»FilterÊôÐÔ¹ýÂËÒþ²ØµÄ¼Ç¼Ҳ¼ÆËãÔÚÄÚ£¨Ä¬ÈÏÖµ£©
adAffectCurrent Ö»°üÀ¨µ±Ç°¼Ç¼
adAffectGroup Ö»°üÀ¨ÄÇЩ·ûºÏµ±Ç°FilterÌõ¼þµÄ¼Ç¼

varStart²ÎÊýÓõ½µÄBookmark³£Êý

³£Êý º¬Òå
adBookmarkCurrent ´Óµ±Ç°¼Ç¼¿ªÊ¼£¨Ä¬ÈÏÖµ£©
adBookmarkFirst ´ÓµÚÒ»Ìõ¼Ç¼¿ªÊ¼
adBookmarkLast ´Ó×îºóÒ»Ìõ¼Ç¼¿ªÊ¼

Supports·½·¨Óõ½µÄ³£Êý

³£Êý º¬Òå
adAddNew µ÷ÓÃAddNew·½·¨
adApproxPosition ÉèÖú͵õ½AbsolutepositionºÍAbsolutePageÊôÐÔÖµ
adBookmark ÉèÖú͵õ½BookmarkÊôÐÔÖµ
adDelete µ÷ÓÃDelete·½·¨
adHoldRecords »ñÈ¡ÁíÍâµÄ¼Ç¼»ò¸Ä±ä»ñÈ¡¼Ç¼ָÕëµÄλÖ㬵«²»Ìύδȷ¶¨µÄ¸Ä±ä
adMovePrevious µ÷ÓÃGetRows,Move,MoveFirstºÍMovePrevious·½·¨£¨±íÃ÷ÊÇÒ»¸öË«Ïò¿É¹ö¶¯Óα꣩
adResync µ÷ÓÃResync·½·¨
adUpdate µ÷ÓÃUpdate·½·¨
adUpdateBatch µ÷ÓÃUpdateBatchºÍCancelBatch·½·¨

adReason²ÎÊýÓõ½µÄ³£Êý

³£Êý º¬Òå
AdRsnAddNew µ÷ÓÃÁËAddNew·½·¨
AdRsnClose µ÷ÓÃÁËClose·½·¨
AdRsnDelete µ÷ÓÃÁËDelete·½·¨
AdRsnFirstChange µÚÒ»´Î¶Ô¼Ç¼×Ö¶ÎÖµ×öÁËÐÞ¸Ä
AdRsnMove µ÷ÓÃÁËMove·½·¨
AdRsnMoveFirst µ÷ÓÃÁËMoveFirst·½·¨
AdRsnMoveLast µ÷ÓÃÁËMoveLast·½·¨
AdRsnMovePrevious µ÷ÓÃÁËMovePrevious·½·¨
AdRsnRequery µ÷ÓÃÁËRequery·½·¨
AdRsnResync µ÷ÓÃÁËResync·½·¨
AdRsnUndoAddNew AddNew²Ù×÷±»Óû§È¡Ïû
AdRsnUndoDelete Delete²Ù×÷±»Óû§È¡Ïû
AdRsnUndoUpdate Update²Ù×÷±»Óû§È¡Ïû
AdRsnUpdate µ÷ÓÃÁËUpdate·½·¨

--------------------------------------------------------------------------------
Ïà¹ØÎÄÕÂ

SQL SERVER»ù±¾¸ÅÄîѧϰӡÏó 2004-1-1 21:23:13
ERwin--¼ò»¯µÄÊý¾Ý¿âÉè¼Æ¹¤¾ß 2003-12-15 12:41:40
ÔÚºêÌõ¼þÖÐÅжϴ°Ìåβ¼Ç¼ 2003-11-20 16:25:48
Á˽â Microsoft Access °²È«ÐÔ 2003-11-13 11:21:08
²»µ±±àдSQLÓï¾äµ¼ÖÂϵͳ²»°²È« 2003-11-13 10:55:26
ʹÓà Jet UserRoster ¼ì²éÊÇË­µÇ¼µ½Êý¾Ý¿âÖÐ 2003-10-18 9:54:42
´´½¨ÍêÃÀ±¨±í 2003-10-17 19:37:17
SQL SERVER ÓëACCESS¡¢EXCELµÄÊý¾Ýת»» 2003-10-17 19:12:00
¶¯Ì¬Ìí¼Ó»òɾ³ýÒýÓà 2003-10-17 19:01:02
MS Jet SQL for Access 2000Öм¶Æª(IV) 2003-10-17 18:52:20
MS Jet SQL for Access 2000Öм¶Æª (III) 2003-10-17 18:51:47
MS Jet SQL for Access 2000Öм¶Æª (II) 2003-10-17 18:51:01
MS Jet SQL for Access 2000Öм¶Æª (I) 2003-10-17 18:47:38
ʹÓÃADOÁ¬½Óµ½·À»ðǽºóµÄSQL Server 2003-10-17 18:43:57
ADOÁ¬½ÓÊý¾Ý¿â×Ö·û´®´óÈ« 2003-10-17 18:40:47
VBAÖгõʼ»¯ADOÁ¬½ÓµÄ¼¸ÖÖ·½·¨ 2003-10-14 8:46:43
ÓÃADOÀ´Ñ¹ËõÊý¾Ý¿â 2003-10-14 8:46:12
ADOÈý´ó¶ÔÏóµÄÊôÐÔ¡¢·½·¨¡¢Ê¼þ¼°³£Êý£¨¶þ£© 2003-10-14 8:45:33
ADOÈý´ó¶ÔÏóµÄÊôÐÔ¡¢·½·¨¡¢Ê¼þ¼°³£Êý£¨Ò»£© 2003-10-14 8:43:26
ÈçºÎÕï¶Ï/ÐÞ¸´Ëð»µµÄ Jet 4.0 Êý¾Ý¿â 2003-10-14 8:31:26
ÌáÉýÇ°ºǫ́ģʽ³ÌÐòµÄËÙ¶È 2003-10-10 10:17:08
»ñÈ¡Ö¸¶¨±íËùÓÐ×Ö¶ÎÃûµÄº¯Êý 2003-10-6 16:44:38
Ò»¸ö¼òµ¥µÄAdoÓ÷¨Ê¾Àý 2003-10-6 16:24:38
Êý¾Ý¿âÓ¦ÓóÌÐòÐè×¢ÒâµÄÎÊÌâ 2003-10-6 11:11:06


ϵͳÓÅ»¯
¿Ø¼þʹÓÃ
Êý¾Ý¿âÉè¼Æ
Êý¾Ý¿âÁ¬½Ó
ϵͳ°²È«
OLE×Ô¶¯»¯
³£¼ûÎÊÌâ
ʵÓôúÂë
ÊôÐÔÏê½â
ÍøÂçÏà¹Ø
ʵÓÃAPI
¾­Ñé·ÖÏí
¾«Ñ¡½Ì³Ì
×Ö·û´¦Àí
ADPÏà¹Ø



ÎÄÕÂËÑË÷



ÖÆ×÷ά»¤£ºÀîÑ°»¶     Mail:[email protected]

¹ØÓÚ±¾Õ¾ -- ÍøÕ¾·þÎñ -- °æȨÌõ¿î -- ÁªÏµ·½·¨ -- ÍøÕ¾°ïÖú
Access°®ºÃÕß°æȨËùÓÐ Copyright 2003-2005 All Rights Reserved δ¾­Ðí¿É²»µÃµÁÁ´