• 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

Sql Exception in Jsp

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.. friends i have a error in my jsp code please check it ..
Error : [Microsoft][ODBC Microsoft Access Driver] The Microsoft Office Access database engine cannot find the input table or query 'null'. Make sure it exists and that its name is spelled correctly.
i give the data is correctly still its show the error... thanks in advance...
<%@ page import="java.sql.*,connection.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.leftbox_main{width:180px; height:1000px;}
.heading{ height:auto; font-size:20px; text-transform:capitalize; text-align:center;}
.price_box{ height:auto; text-transform:capitalize; text-align:left; padding: 4px 3px 0 0; margin-left:21px;}
.price_box_width{ width:30px; height:10px;}
.go_btn{ background:#00C; display:inline;}
.headingbox{ height:auto; }
.headingbox ul{text-decoration:none; list-style:none;}
.icn_color{

display: inline-block;
height: 13px;
width: 19px;
margin:0px 8px 0px 6px;
}
.btn{background:#00F; width:50px; height:20px;}
.
</style>
<script type="text/javascript">
function onbrand() {
document.arpit.submit();
}
function onsize() {
document.nitin.submit();
}
function oncolor() {
document.pallavi.submit();
}
function onprice() {
document.komal.submit();
}
</script>
</head>

<body>
<%! String table;
String product_type;
%>
<%
table=request.getParameter("table");
product_type=request.getParameter("product_type");
if(table==null && product_type==null)
{
table=request.getParameter("table2");
product_type=request.getParameter("product_type2");
System.out.println("arpit..................."+table+product_type);
}
Connection con=new DatabaseConnection().getConnection();
%>
<div class="leftbox_main">
<form name="arpit" action="SelectionLayout.jsp" method="get">
<div class="heading">Brands</div>
<div class="headingbox">
<ul>
<%
System.out.println("select distinct brand from "+table+" where product_type="+product_type);
PreparedStatement brand=con.prepareStatement("select distinct brand from "+table+" where product_type=?");
brand.setString(1,product_type);
ResultSet rsbrand=brand.executeQuery();
String br="";
while(rsbrand.next())
{
br=rsbrand.getString("brand");
%>
<li><input name="brand" type="checkbox" value="arpit" onclick="onbrand();"/><%=br %></li>
<%
}
%>
</ul>
<input type="hidden" name="table1" value="<%=table%>"/>
<input type="hidden" name="product_type1" value="<%=product_type%>"/>
</div>
</form>
</div>
</body>
</html>
 
Greenhorn
Posts: 22
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please check whether the odbc drivers for that particular data base are installed correctly
 
Arpit Kumar gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i already checked that it is correct first time a call this jsp and send the data its working file and when i click any check box and the form auto load request goes to same jsp the the two parameter move on the current jsp..
 
reply
    Bookmark Topic Watch Topic
  • New Topic