Determining if RS field is an AutoNumber

Results 1 to 2 of 2

Thread: Determining if RS field is an AutoNumber

  1. #1
    Join Date
    Dec 1969

    Default Determining if RS field is an AutoNumber

    Is there some way to determine if a field in a database is an AutoNumber? Something like the rs("FieldName").type property (the type property only returns AutoNumbers as 3, or LongInteger).<BR><BR>Thank you in advance,<BR><BR>Grant D. Skinner<BR>Director,

  2. #2
    Join Date
    Dec 1969

    Default RE: Determining if RS field is an AutoNumber(updat

    I don&#039t know for sure if you can test for an autonumber, but the Admin pages generated by Interdev 1.0&#039s Data Form Wizard have code for testing if the field is updateable.<BR><BR>Const adFldUpdatable = &H00000004<BR>Const adFldUnknownUpdatable = &H00000008<BR><BR>&#039-------------------------------------------------------------------------------<BR>&#039 Purpose: Tests whether the field in the recordset is updatable<BR>&#039 Assumes: That the recordset containing the field is open<BR>&#039 Effects: Sets Err object if field is not updatable<BR>&#039 Inputs: strFieldName - the name of the field in the recordset<BR>&#039 Returns: True if updatable, False if not<BR>&#039-------------------------------------------------------------------------------<BR><BR>Function CanUpdateField(strFieldName)<BR> Dim intUpdatable<BR> intUpdatable = (adFldUpdatable Or adFldUnknownUpdatable)<BR> CanUpdateField = True<BR> If (rsAdminNewsNews(strFieldName).Attributes And intUpdatable) = False Then<BR> CanUpdateField = False<BR> End If<BR>End Function<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts