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

cfqueryparam error with empty string

New Here ,
Sep 12, 2008 Sep 12, 2008
Hi all - One of our legacy servers is running CF 5.0 against a MySQL 4.0.16 MYISAM table. I am attempting to use cfqueryparam to insert a passed form variable to a varchar field that does not allow NULL, as shown in the example. If the form variable happens to contain the empty string then I receive the following error:
ODBC Error Code = 94 ()
[MERANT][ODBC MySql driver]6053

I have retried the query with the cfqueryparam parameter, null="no", and get the same error. If I remove the cfqueryparam altogether and just insert the empty string then it works fine. I am convinced that the syntax of the INSERT is not at fault, but can't figure out what is.

Can anyone enlighten me?

362
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
New Here ,
Sep 12, 2008 Sep 12, 2008
LATEST
I find that if I change the cfsqltype to "cf_sql_longvarchar" then the insert works. This should not be necessary, though, because the column into which the data is being inserted is defined as varchar(80). Plus, I don't feel comfortable using that, so any other info you all have would be appreciated.
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