Results 1 to 2 of 2

Thread: gooey GUIDs

  1. #1
    Join Date
    Dec 2003
    Location
    Tasmania
    Posts
    58

    Unanswered: gooey GUIDs

    I am using Sqlserver database with access as front end , & am using GUIDs in the sqlserver tables.
    I have a form bound to a sqlserver table & a text box bound to a GUID field.

    StrGUID = Me.txtItemUniq.Value returns [??????]

    strGUID = StringFromGUID(Me.txtItemUniq.Value) returns
    {guid {1113ACEE-EA77-47BF-97A3-12B48B7F4F8E}}
    If I use this to filter a form Access crashes

    When I strip off the leading “{guid” and the trailing “}”
    strGUID = StringFromGUID(Me.txtItemUniq.Value)
    strGUID = Mid(strGUID, 7, Len(strGUID) - 7)

    and use this as a filter, it works
    strSql = "ItemUniq='" & strGUID & "'"
    Forms("frmItemMaint")("ctlsfrExistingTestDetails") .Form.Filter = strSql

    All a bit cumbersome !! Is this the usual way of handling this or is there some other, more elegant way that I’ve missed ?

    I originally had the system working, using identity fields rather than GUIDs, but found that this would make replication problematic, so I converted to GUIDs.
    There are places all thru my code where I do things with GUIDs – sql INSERT, sql aggregate fns (get specific access error with this one), moving a table value to a string variable & vice versa … etc.
    Do I need to change ALL of these to use the GUIDtoStr fn (then stripping a few bits out)? And then do I need to use StrtoGUID fn when going the other way ?
    I’m looking for a bit of guidance before leaping in & making massive changes that might be unnecessary.
    catkins

  2. #2
    Join Date
    Dec 2003
    Location
    Tasmania
    Posts
    58

    Re: gooey GUIDs

    No guidance on this one ?

    Honks face fell...

    Has no one encountered this problem ? Are there no comments to give me guidance &/or encouragement as I wade thru the mire ?
    catkins

Posting Permissions

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