akn112
10-03-2007, 07:19 AM
hey all, i've been looking into changing the way my database assigns these "User Access IDs". Currently it is an autonumber field and is updated through
If UserAccessId <= 0 Then
Set adodbRecordSet = adodbconnection.Execute("SELECT @@identity", , adCmdText)
If adodbRecordSet.EOF = False Then
UserAccessId = adodbRecordSet.Fields(0)
End If
End If
I was thinking of changing it to a number field and making this alteration
If UserAccessId <= 0 Then
UserAccessId= dmax("UserAccessID", "tblAccess")
End If
What're ur thoughts on a change like that.
The reason being is i feel that number fields are much more flexible than autonumber fields. We've also had a number of occassions, where we made a ID (15), database was crashed and restored and someone made another ID(15) for another person. But i couldnt edit it cause it was a autonumber field. We had to make a new ID(16) for the person and let them know of the update.
If UserAccessId <= 0 Then
Set adodbRecordSet = adodbconnection.Execute("SELECT @@identity", , adCmdText)
If adodbRecordSet.EOF = False Then
UserAccessId = adodbRecordSet.Fields(0)
End If
End If
I was thinking of changing it to a number field and making this alteration
If UserAccessId <= 0 Then
UserAccessId= dmax("UserAccessID", "tblAccess")
End If
What're ur thoughts on a change like that.
The reason being is i feel that number fields are much more flexible than autonumber fields. We've also had a number of occassions, where we made a ID (15), database was crashed and restored and someone made another ID(15) for another person. But i couldnt edit it cause it was a autonumber field. We had to make a new ID(16) for the person and let them know of the update.