Aha, well you know better than me :) ..
Thanks for your consideration.. i will talk to my supervisor about it :) ..

well jwenting im still in a level they dont teach us advanced things :) ..

Thanks :)

Thanks masijade :) ...

hehe no i dont want :P .. but this what they taught us in college !! ... basic things ..

however the most important thing is that the code doesnt fully change ... we have 4 weeks to finish the project :P ..

thanks again :)

this is the code ... it checks whether the id exist or no !! .. when the person insert ..

<%@ page language="java" import="java.sql.*" errorPage="" %>
<%!

 String sqlStat;
 Connection conn;
 Statement stmt;
 int prodno,  price;
 String prodname, ptype;
%>
<%

   try {

      prodno  = Integer.parseInt(request.getParameter("prodno"));
  prodname   = request.getParameter("prodname");
  ptype  = request.getParameter("ptype");
  price = Integer.parseInt(request.getParameter("price"));

  sqlStat = "INSERT INTO itemTBL (PRODNO, PRODNAME, PTYPE, PRICE) VALUES ";
  sqlStat = sqlStat + "(" + prodno   + ",";
  sqlStat = sqlStat + "'"  + prodname   + "',";
  sqlStat = sqlStat + "'"  + ptype  + "',";
  sqlStat = sqlStat + ""  + price + ")";

        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  conn = DriverManager.getConnection("jdbc:odbc:prodDSN","","");
  stmt = conn.createStatement();
  stmt.executeUpdate(sqlStat);

     out.print("Product ID already exist");
     %>
     <br>
     Click
      <a href="selectall.jsp" >view all </a>
      to bla bla
  <%
  conn.close();

 } catch (Exception e) {
   out.println("Error : " + e.getMessage() );
 }      
%>

this how the way ..

C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT
then put ur files u want .. but if u want to put it in folder u need to put the web-inf inside this folder ,, u will find this web-inf in the root folder just copy and paste it on the folder ..

when u will use tomcat.. there is 2 ways .. if u just put ur files in ROOT then u just write

[URL]http://localhost:8080(u[/URL] have to check ur host num maybe its 8081)/(write the html )

eg. [URL]http://localhost:8080/dbinsert.html[/URL]

the 2nd way if its in a folder and u named example the folder "me" the it will be like this

[URL]http://localhost:8080/me/dbinsert.html[/URL]

:)

Hi all ..

this jsp code when we use database access, to get the information by entering the price , my problem is that now iam using oracle as database and i dont know what are the changes that can be made here only ofcorse the path of database this i have , but string will it change because in oracle its varchar ? .. !! .. plz help.. its my first time to do this ..

Thanks :)

[COLOR=royalblue]

[/COLOR] [COLOR=royalblue][/COLOR] [COLOR=royalblue]


[/COLOR]