[Macromedia][SQLServer JDBC Driver]Syntax error at token 0, line 0 offset 0

Posted May 18, 2006 at 7:30 AM by Ben Nadel

Tags: ColdFusion, SQL

I spend a good amount of time helping other people debug their code and I run into this error plenty of times:  [Macromedia][SQLServer JDBC Driver]Syntax error at token 0, line 0 offset 0. The first time I ran into it, I was helping a co-worker with a Query statement that had many CFIF statements. Having never seen it before, it took some time to figure out. Now, it's just obvious. No SQL is being passed to the database. He had so many CFIF statements with crazy logic, that none of them were TRUE and no SQL code was being evaluated.

If you ever get this, take out some logic, you probably don't need it.



Reader Comments

Feb 3, 2007 at 8:54 PM // reply »
1 Comments

I saw this error about four time (with out any cfif tags in my SQL statement) and decided to Google it. Thanks!


T
Aug 9, 2007 at 4:49 PM // reply »
1 Comments

Thanks for the help. I get this at times and fix it by looking extensively at the code, but this makes sense now.


Oct 23, 2008 at 3:22 PM // reply »
1 Comments

Great, Thanks Ben!


Nov 5, 2008 at 10:55 AM // reply »
1 Comments

This just saved me alot of time. I copied and pasted a query outside the closing cfquery tag. Duh.


Nov 5, 2008 at 10:58 AM // reply »
11,314 Comments

@Walt,

Gald to help. This is such an odd error and totally not obvious when you're looking at the ColdFusion code.


Mar 9, 2009 at 4:15 PM // reply »
6 Comments

Thanks Ben. I thought sure you were wrong on this error, but it turned out to be a missing CFIF.


May 15, 2009 at 12:47 PM // reply »
1 Comments

Was beating my head against the wall until I realized I had removed my SQL statements but not the cfquery tags themselves, and inserted a bunch of code between. Would still be looking for it if not for this post. Many thanks! :-)


May 19, 2009 at 9:27 AM // reply »
11,314 Comments

@JEBster,

Hey man, glad to help :)


Sep 14, 2009 at 9:09 AM // reply »
1 Comments

Really this saved me some hair, Thanks man


Apr 27, 2010 at 8:59 PM // reply »
1 Comments

Hye Mr Ben,

I'm very junior to ColdFusion. Came accross this kind of error and found out the solution in this page. Thanks a lot.

Eventhough my error has nothing to with so-called "Extra CFIF tag", but your posting gave me some ideas to solve it.


May 18, 2010 at 9:12 PM // reply »
11,314 Comments

@Ma,

Can I ask what your problem ended up being?


May 1, 2011 at 2:29 PM // reply »
4 Comments

Mine was caused by a cfloop having nothing to loop over in the cfquery it looks like.


Feb 18, 2013 at 3:41 AM // reply »
1 Comments

Thanks Ben , That was superb, saved a lot time,

MY ISSUE was , missing to feed a input button, in turn no cfif conditions in the cfquery executed



Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
Jun 18, 2013 at 3:39 PM
Experimenting With The Amazon Simple Storage Service (S3) API Using ColdFusion
Hi Ben, THANKS! While not bleeding edge, it is new to me & I like learning new things every day! ... read »
Jun 18, 2013 at 12:30 PM
Disabling Auto-Correct And Auto-Capitalize Features On iPhone Inputs
Also spellcheck="false" should be mentioned as part of html5 specs ... read »
Jun 18, 2013 at 8:40 AM
Using Named Functions Within Self-Executing Function Blocks In Javascript
Hi Ben, you forgot to mention the most important thing for named self-executing functions - they can be referenced by name ONLY inside their execution context (which is parens in this case), it mean ... read »
dee
Jun 18, 2013 at 7:01 AM
My Safari Browser SQLite Database Hello World Example
hai ben, this program is really good i could understand the concept but i dint know how to save it and how to open it as you have done in the video can u give that details pls ... read »
Jun 18, 2013 at 6:04 AM
Clearing Inline CSS Properties With jQuery
Thanks a lot for for post! It helped me a lot... after being stuck since 24 hrs.. found solution from your post. Thanks again! ... read »
Jun 18, 2013 at 2:31 AM
SOTR 2013 - The Best Conference I Never Went To
I keep watching it, should keep me happily distracted until SotR14 ;) ... read »
Jun 17, 2013 at 9:45 PM
What If All User Interface (UI) Data Came In Reports?
@Jonah, As I was reading what you wrote, it occurred to me that maybe I do something similar to that in some of my client-side code. In an application I'm working on, there are a bunch of unrelated ... read »
Jun 17, 2013 at 9:36 PM
Object Thinking By David West
@Jonah, Please, don't feel bad at all. I appreciate all that you have contributed to the conversation. And, the more points of view I get, the more confident I am that I will some day, some how und ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools