jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes Problem creating a PreparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem creating a PreparedStatement" Watch "Problem creating a PreparedStatement" New topic
Author

Problem creating a PreparedStatement

Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
The forum description said we could "even brush up on some sql " here so I'm hoping you don't mind this question.

I'm just getting a vague message that there is something wrong with the syntax:


The value of paperTitle in the debug window is "BeKind.doc".

Is the problem the period within the String? If so, what must I change?

Thanks so much.
Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Sir...

what do you save name of your data/attachment?..
what kind of document could be saved in your application?



As far as i know, your preparedStamenet isn't wrong..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Yes, the statement does work at the command line. It only appears to be a problem in the servlet in the PreparedStatement.

I am not sure at this time what types of documents I will store; but at least some will be Microsoft Word documents being
stored in a BLOB in MySql. I can store the document just fine; I am now trying to select the row in the table with the title of
the document.

Thank you for any suggestions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem creating a PreparedStatement