Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Problem creating a PreparedStatement

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic