Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query Correct, but not functioning

 
Michael Paul
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to write to a DB from my code however the data is not writing to the database. I ran the SQL statement through the DB Frontend that I use and it worked, however through my code it does not work. Here is the snippit:




Any help at all would be appreciated, I am very stumped,

Atreides
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Atreides", please check your private messages for an important administrative matter.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


But how would you know if anything was failing?
 
Michael Paul
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did a printStackTrace, and it said I couldn't use "executeQuery" to manipulate data. So I used executeUpdate and it worked, thanks for reminding me to do a printstacktrace, i was being dumb, thanks again!

Michael
[ April 16, 2008: Message edited by: Michael Paul ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you ninny :P

Although keep in mind that printStackTrace doesn't count as 'handling the exception' either, but it's one step better than swallowing it without comment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic