Any Known Problem with Using GUID in Access-2000?

  • Thread starter Thread starter Jay Chan
  • Start date Start date
J

Jay Chan

I would like to know all the known problems in using GUID
(uniqueidentifier) in MS-Access-2000. So far I have come across one
problem. I want to know if there are other problems that I need to
work around with.

My system is using GUID as (1) a primary key (2) a replication-ID for
replicating info from one MS-SQLServer to another MS-SQLServer in
another branch (using merge-replication).

The problem that I have come across has to do with using a list-box
that is dynamically bounded to a table in a MS-SQLServer database. I
have the GUID as the first column of the list box, and as the bounded
column. I have hidden it. The problem happens when I try to see
whether any item in the list is selected. I will get a phantom GUID if
the list-box is empty. In other words, the problem only happens with
these combination:
- The bounded column of the list box is a GUID.
- The list-box allows single-selection, not multiple-selection.
- The list-box is empty because the query in the RowSource
doesn't return any row.
When I use Me("lstMyTableWithGUID").Value to get the GUID of the
selected item of the list-box, and if the list-box is empty, I will
get a phantom GUID that looks like a valid GUID (but it is not). I
must get around with this problem using the following function:

Private Function vGetSelectedIDFromMyTbl() As Variant
Dim nListCount As Integer
nListCount = Me("lstMyTbl").ListCount
If (nListCount = 1) Then
If (IsNull(Me("lstMyTbl").ItemData(0))) Then
nListCount = 0 'This one item is a phantom.
End If
End If

If (nListCount = 0) Then
vGetSelectedIDFromMyTbl = Null
Else
vGetSelectedIDFromMyTbl = Me("lstMyTbl").Value
End If
End Function

Are there other problems of GUID that I need to know of?

Thanks in advance.

Jay Chan
 
Back
Top