Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at cf.Objective() 2012 (Minneapolis, MN) with:

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

By Ben Nadel on
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

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

Reply to this Comment

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

Reply to this Comment

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

Reply to this Comment


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

Reply to this Comment

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

Reply to this Comment

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! :-)

Reply to this Comment

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.

Reply to this Comment

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

Reply to this Comment

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

Reply to this Comment

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
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.