File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes missing equal sign Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "missing equal sign" Watch "missing equal sign" New topic

missing equal sign

Aniruddha Dhar

Joined: Jul 22, 2012
Posts: 1

i am new at this and trying to understand different things.can't get this one right.please help....
thanks in advance...
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 30789

Try putting a System.out.println() that writes out the sql and run it against the sql command line. This will tell you which part of the SQL has an error.

Also, consider using a Prepared Statement so you don't have so much string concatenation and the query is safer.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bill Clar
Ranch Hand

Joined: Sep 21, 2006
Posts: 152

Is "c/o" a valid database field name?
Rob Spoor

Joined: Oct 27, 2005
Posts: 19725

It is if you enclose it properly. MS SQL Server and Access use [], MySQL uses ``, most others use "".

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: missing equal sign