Code Charge and MS Access

I am using a code generating tool called code charge.  I am using the builder to update a Access Database table.  

I have two labels pulling data from another table but those ID are also in the table that I am updating.  I do not want to combine the two tables because I will have to modify it later.  

UPDATE tbl_ActivityPaths
SET  tbl_ActivityPaths.path='{path}'
WHERE  tbl_ActivityPaths.id = {identify}

When I run this query I receive the following error message...

Malformed GUID. in query expression 'tbl_ActivityPaths.id = {identify}'. (Microsoft JET Database Engine)

Any thoughts would be appreciated...

Thanks,

Bart

Barton_DayAsked:
Who is Participating?
 
Arthur_WoodCommented:
the {...}  characters are SPECIAL indicators to Access that what is contained between them is a GUID (Globally Unique Identifier) a GUID ia a 128 bit  Hex Number, which, by the way it is constructed, is essentailly gauaranteed to the 'gloablly unique' -  you migth try enclosing the {...} in [...]:

UPDATE tbl_ActivityPaths
SET  tbl_ActivityPaths.path='{path}'
WHERE  tbl_ActivityPaths.id = [{identify}]

Access is trying to interpret the

UPDATE tbl_ActivityPaths
SET  tbl_ActivityPaths.path='{path}'
WHERE  tbl_ActivityPaths.id = {identify}


where I would have expected the {...}  tokens to have been replaced with Literal values before the SQL is sent to Access to be processed.  That is the real source of the error message - why isn't the SQL being pre-processed, before being sent to Access.

AW
0
 
Barton_DayAuthor Commented:
AW...that was Exactly right...!!!! Cant believe it is always the little things we overlook....thanks again...

Bart
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.