• 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

Parameter index out of range (1 > number of parameters, which is 0).

 
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi people,
I´m having a problem in my servlets. After try many times I´m needing help to solve this error: parameter index out of range.

This is my DAO that access my DB:


Follow my code that call the DAO:



Thanks in advance for your help.

Cezar Apulchro.
 
Saloon Keeper
Posts: 7585
176
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things jump out from the SQL:

1) It's missing a space between Tabela_Procedimentos_Ultrassonografia and WHERE.

2) The single quotes around the ? should be removed - prepared statements do that sort of thing for you.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,
so simple and I could not see the problem.

Problem is solved.

Thanks and best regards.

Cezar Apulchro.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic