Skip to main content
Ben Nadel at the New York ColdFusion User Group (Jan. 2009) with: Simon Free
Ben Nadel at the New York ColdFusion User Group (Jan. 2009) with: Simon Free

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

By
Published in , Comments (13)

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

1 Comments

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

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.

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

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.

2 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

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel