Skip to main content
Participant
March 15, 2008
Answered

Malformed GUID in hosting migration

  • March 15, 2008
  • 1 reply
  • 459 views
I am moving a site from a Win2k3 server running IIS6, CF7 and using an MS Access database to new hosting provider. I'm using their Windows Hosting option so I can just set up the access datasource and move the code, but have run into an error I have been unable to solve after hours of googling. Any help?

Malformed GUID. in query expression 'sdate <= #03-15-2008# AND edate >= #03-15-2008# OR { fn MONTH(sdate)} = 3 AND { fn DAYOFMONTH(sdate)} = 15 AND recur = true'.

I cut up both halves of the query and was able to isolate it down to having something to do with the MONTH and DAYOFMONTH functions. This code works just fine on the old server. Seems like standard enough SQL, what would the new host be doing to cause these functions to error?
This topic has been closed for replies.
Correct answer Thumper
I'm not really sure why the {fn syntax was necessary on the original code, but this code is from 1996 and I believe back then I still needed it. Getting rid of that didn't fix it, but getting rid of that AND changing DAYOFMONTH to just DAY appears to have resolved the problem. Not sure why the one server (which is relatively new) still supported that old code but not the new server. Thanks for your help!

1 reply

Inspiring
March 16, 2008
What is the "{ fn " syntax is for? Is there a reason you cannot use the standard Month() and Day() functions? I would also suggest using cfqueryparam.

ThumperAuthorCorrect answer
Participant
March 16, 2008
I'm not really sure why the {fn syntax was necessary on the original code, but this code is from 1996 and I believe back then I still needed it. Getting rid of that didn't fix it, but getting rid of that AND changing DAYOFMONTH to just DAY appears to have resolved the problem. Not sure why the one server (which is relatively new) still supported that old code but not the new server. Thanks for your help!