This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 31415

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.

[OCA 8 book] [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: 155

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

Joined: Oct 27, 2005
Posts: 19847

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