• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please Help(executeQuery)

 
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I don't understand why it gives me this error what should I do with bugNumber after double code?
Many thanks,
Elham
Error--------
PrepStmt =con.executeQuery("delete * from bug where bugNumber="+ bugNumber);
Delete_Bug.java [80:1] No method found matching executeQuery(String)
PrepStmt =con.executeQuery("delete * from bug where bugNumber="+ bugNumber);
^
1 error
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved!!!
Sooooooooooo tiny just look at the * in query it drove me crazy never thought about it....
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moral of this story is: ALWAYS test your SQL statements in a database client separate to your Java code!
(it could have been "Always post JDBC questions to the JDBC forum", but it isn't )
Dave.
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know.... :roll:
 
reply
    Bookmark Topic Watch Topic
  • New Topic