Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Malformed GUID in hosting migration

Community Beginner ,
Mar 15, 2008 Mar 15, 2008
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?
TOPICS
Database access
391
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Mar 16, 2008 Mar 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!
Translate
Valorous Hero ,
Mar 16, 2008 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 16, 2008 Mar 16, 2008
LATEST
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!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources