aspose file tools*
The moose likes JDBC and the fly likes jdbc value retrieval from a bean and then from a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc value retrieval from a bean and then from a jsp" Watch "jdbc value retrieval from a bean and then from a jsp" New topic
Author

jdbc value retrieval from a bean and then from a jsp

Shehzad Khan
Greenhorn

Joined: Jan 24, 2002
Posts: 6
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 ]
Napa Sreedhar
Ranch Hand

Joined: Jan 29, 2002
Posts: 62
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

Joined: Jan 29, 2002
Posts: 62
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

Joined: Jan 24, 2002
Posts: 6
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
 
 
subject: jdbc value retrieval from a bean and then from a jsp