Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7503575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:16:20+00:00 2026-05-29T21:16:20+00:00

I get a very unhelpful SQL error from Railo when trying to do an

  • 0

I get a very unhelpful SQL error from Railo when trying to do an insert. I think it has something to do with the :param values I am passing to it; as when I take these out and replace them with a simple string, it works.

Here’s my code (which sits inside a CFC):

local.registerUserQuery = new query();
            local.registerUserQuery.setDatasource("popwave");
            local.registerUserQuery.setSQL("

                INSERT INTO users (

                    userUUID,
                    userName,
                    userPassword,
                    userEmail,
                    userToken,
                    userCreated,
                    userBiography,
                    userCommentPoints,
                    userLinkPoints,
                    userImageID,
                    userRemoved,
                    userCategoriesOwner,
                    userCategoriesSubscribed

                )

                VALUES (

                    '#createUUID()#' , 
                    :userName , 
                    :userPassword , 
                    :userEmail , 
                    '#local.token#' , 
                    #createODBCDate(now())# , 
                    '' , 
                    0, 
                    0, 
                    0, 
                    0, 
                    0, 
                    0 

                )

            "); 

            local.registerUserQuery.setName("registerUser");

            local.registerUserQuery.addParam( name="userName", value="#arguments.userName#", cfsqltype="cf_sql_varchar" ); 
            local.registerUserQuery.addParam( name="userPassword", value="#arguments.userPassword#", cfsqltype="cf_sql_varchar" ); 
            local.registerUserQuery.addParam( name="userEmail", value="#arguments.userEmail#", cfsqltype="cf_sql_varchar" );

            local.registerUserQuery.execute();

I cannot understand for the life of me why this is throwing an error! I need to be able to use :param’s.

Here’s the Railo error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 49

Examining that line number does not seem to point to anything related. This query is on something like line 200! And, as mentioned earlier…the SQL seems to work when I replace these :param values.

Is there actually something I am doing wrong here? Pulling my hair out!

Thanks,
Michael.

EDIT:

Forgot to mention, the Railo version is:

Railo 3.3.1.000 Error (database)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:16:22+00:00Added an answer on May 29, 2026 at 9:16 pm

    Sounds like you are experiencing issue RAILO-1281 which should be fixed in 3.3.1.005.

    “RAILO-1281: When doing a query INSERT with CFScript “new query()” and using a
    cfqueryparam with addParam(), the end “)” is removed”

    As an aside, you should use addParam for all of the dynamic values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get something very subtle to work, it looks pretty awful right
I get output files from very old Fortran programs, which look like: 0.81667E+00 -0.12650E+01
Very basic question - how to get one value from a generator in Python?
We get this error in Visual Studio 2005 and TFS very often. Can anyone
I am very new to erlang and am trying to get my head around
We get very blurry text rendering when using HyperLinkButton. I think its most clearly
I need to get very basic input from an external file in C++. I
I get very different results when trying to find the best AR(p) model using
I get very confused when it comes up to byte conversation. I need to
When running the following Java code, I get very accurate and consistent results in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.