• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

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

0
Barton_Day
Asked:
Barton_Day
1 Solution
 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now