• 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
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

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

 
Ranch Hand
Posts: 333
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: 7038
164
  • 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: 333
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.
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic