This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

jdbc value retrieval from a bean and then from a jsp  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everyone
i am trying to call database values from a bean and then ultimately want to display them from a jsp but the error "java.sql.SQLException: no data found" arising everytime.
what to do? please help. my database name is ppp.mdb and it is placed in d:\jakarta-tomcat-4.0-b5\examples\jsp\ppp.mdb
in here, i have two tables with the name a)conference and b)shuttles
in the conference table, i have four field which i am writing in the following order: field_name:field_type
1)ID:integer
2)city:String
3)airport:String
4)seats:integer
the ConnectionBean class code is the same that i have posted previously
however i have changed conference1.jsp a bit.
so the code of conference1.jsp is pasted here.
i want to tell that i have tomcat server and the path for both .java and .jsp is as follows:
d:\jakarta-tomcat-4.0-b5\webapps\examples\web-inf\classes\babaji\ch_7\ConnectionBean.java
d:\jakarta-tomcat-4.0-b5\webapps\examples\jsp\conference1.jsp


please help and let me know the solution for this error
thanks, wating anxiously for the reply
bye
take care
from Shehzad Khan
[ Edited by Dave to format code and fix UBB smilies ]
[ January 31, 2002: Message edited by: David O'Meara ]
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everrthing seems to be fine...
But a look up.. Chek the dbURL in your connection bean class... Is it OK ?
Napa
 
Napa Sreedhar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And one more suggestion use PreparedStatement in your bean class.
I heard some where that Statement doesn't work out for regular expressions.
Napa
 
Shehzad Khan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody
thanks a lot mr.napa sreedher, for your kind suggestion. but still no use.
i kindly request you mr. napa and also request to anyone that you run this code which i have given here on your pc if you have some time and let me know whether it is running alright or not.
ok take care
bye
from shehzad khan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!