Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


daksesh
services
0 Answer(s)      2 years and 4 months ago
Posted in : Java Beginners


public class ProductServices {
    public boolean addProduct(ProductBean bean,Connection con)throws SQLException
    {
        PreparedStatement st=null;

        try
        {

            String productName=bean.getProductName();
            String desc=bean.getDescription();
            String features=bean.getFeatures();
            String price=bean.getPrice();
            String quantity=bean.getQuantity();
            String eligibility=bean.getEligibility();
            String thresholdLimit=bean.getThresholdLimit();
            String colorCode="green";

            st=con.prepareStatement("insert into product values(seq_person.nextval,'"+productName+"','"+price+"','"+quantity+"','"+thresholdLimit+"','"+features+"','"+desc+"','"+eligibility+"','"+colorCode+"')");
            int rs=st.executeUpdate();

        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        finally
        {
            con.close();
            st.close();



        }
        return false;
    }
    public void updateProduct(ProductBean bean, Connection conn)
    throws SQLException {
        PreparedStatement statement=null;

        try {

            String productname = bean.getProductName();
            String price = bean.getPrice();
            String quantity = bean.getQuantity();
            String thresholdLimit=bean.getThresholdLimit();
            String eligibility=bean.getEligibility();



            statement = conn.prepareStatement("Update Product set PRICE='"+price+"',QUANTITY='"+quantity+"',THRESHOLD_LIMIT='"+thresholdLimit+"',ELIGIBILITY_FOR_REWARDS='"+eligibility+"' where PROD_MODEL_NAME='"+productname+"' ");

            int rs=statement.executeUpdate();

        } catch (SQLException sqle) {

            conn.close();
        } catch (Exception e) {

            conn.close();
        }
        finally
        {
        conn.close();
        statement.close();

        }

        }
public void deleteProduct(ProductBean bean, Connection conn)
    throws SQLException {
        PreparedStatement statement=null;

        try {

            String productName = bean.getProductName();
            String price = bean.getPrice();
            String quantity = bean.getQuantity();
            String thresholdLimit=bean.getThresholdLimit();
            String eligibility=bean.getEligibility();



            statement = conn.prepareStatement("Delete Product where PROD_MODEL_NAME='"+productName+"' ");

            int rs=statement.executeUpdate();

            statement = conn.prepareStatement("Delete ret_prod where PRODUCT_ID in(select PRODUCT_ID from Product where PROD_MODEL_NAME='"+productName+"' )");
            int rs1=statement.executeUpdate();

            statement = conn.prepareStatement("Delete stock where PRODUCT_ID in(select PRODUCT_ID from Product where PROD_MODEL_NAME='"+productName+"' ) ");
            int rs2=statement.executeUpdate();

        } catch (SQLException sqle) {


        } catch (Exception e) {


        }
        finally
        {
        conn.close();
        statement.close();

        }

        }

Advertisement
View Answers

Related Tutorials/Questions & Answers:
Web Services
Web Services  Explain web services with example?? asked by 4p3   Please visit the following link: Webservices Tutorials
Advertisements
Joomla Services
Joomla Services Here in RoseIndia Technologies, we offer a broader range of service like creating highly innovative and interactive websites, developing..., Printable Versions, Blogs etc. Moreover we also offer following services
web services
services I did many times but no success found
Web Services
Web Services       Normally... services goes on in our daily-life. Web services was first time introduced in EJB2.1, while EJB3.0 made the web services development easy and more flexible
Web Services - XML
What is Web Services and why it is used for?  What is Web Services and why it is used for? Can anyone suggest a best tutorial website for web services
Web Services Tutorials
Web Services Tutorials  I am learning Web Services. Give me the examples of Web Services. Thanks   Hi, Check the tutorial Web Services Examples in NetBeans. Thanks
Web Services - Web Services Tutorials
Web Services - Web Services Tutorials In this section of the Web Services tutorial you will be familiarized with the Web Services. Introduction... to the remote source. One can access Web services using nothing but HTTP. Of all
Java Message Services - JMS
Java Message Services  What is Java Message Services
services provided by a container
services provided by a container  What are the services provided by a container?   The services provided by container are as follows: Transaction management for the bean Security for the bean Persistence of the bean
Types of hosting services
looking for the hosting services. But I don't know how many types of hosting services exists these days. Can anyone tell me about different Types of hosting services and what are the merits and demerits of each of them? Looking for good
Web services - WebSevices
Web services  I need one example of web services with database also. This example should run on eclipse ide
Web Services in PHP
Web Services in PHP  I want to know how can i use webservices in my php app
Web Services Growth
Web Services Growth The growth of open standards creates new opportunities for designers and developers of applications and services. By writing to Java... of their perspective customers. By making its legacy data available via XML-based Web services
web services - WebSevices
web services  Give me description about web services?how wewill use soap,wsdl,uddi.Give me explanation with examples
Web Services Issue - WebSevices
Web Services Issue  My requirement is to invoke web services through... will invoke the services in my application which is running in web sphere. in my case through delegate class i have to invoke the services. So plz help me because i
Sitemap Web Services Tutorial
Map | Business Software Services India Web Services Tutorial Section... Axis2 on Tomcat | Web services technologies | Installing axis2 eclipse... | Java Client webservice | Cheap Web Hosting Services in Mumbai | Cheap Web
spring Web Services - Spring
spring Web Services  Hi, Can any one explains or give me some example which gives me that how to start up spring web services. Thanks, mahi
XMl and Java web services
XMl and Java web services  I want to do a project on java web services and XML. I wanted to ask, how the data entered by user through the HTML file... the data can be retrieved back from that XML file so that using web services
Java message services
; Java Message Services In this section, you will read about the java messages Services (JMS). This tutorial provides an overview of the JMS and offers the basics for developing programs using it. The java message services API
WEB-SERVICES-JAXRPC - WebSevices
WEB-SERVICES-JAXRPC  when i excute simple webservice i got this exception:javax.xml.rpc.JAXRPCException plz hel me how to resolve?  Hi Friend, Please visit the following links: http://www.roseindia.net/webservices
Software Outsourcing Services India
outsourcing services? Get the best package from Rose India Software... and outsourcing services. Our Software Services
creating web services - WebSevices
creating web services  Actually i am new for web services so Plz tell me how we can create and implement a web services, and please send any easy...;** Simple Example of Developing Web services in Java ** By Vijeta Jaiswal M.Tech
Web Services - Web Services Tutorials
Web Services       Normally... services goes on in our daily-life. Web services was first time introduced in EJB2.1, while EJB3.0 made the web services development easy and more flexible
Good web services site - WebSevices
Good web services site  Hi can i get reference to the web services site, where i can get the complete web services for scratch.  Hi Naresh, I guess u r in right place. I learn my self from roseindia. thanks
web services security testing by soapUI
web services security testing by soapUI  how to make security testing to online examination system by soapUI
Java Message Services
Java Message Services       In this section, you will read about the java messages Services (JMS... for developing programs using it. The java message services API is a java Message oriented
EJB container services
EJB container services       The EJB container is a container that deploys EJB automatically when Web Server... the EJB container services:-   Services  
Web Services
Web Services         Web services are web-based application that translates your application into browser-based application using XML, SOAP, WSDL
Different types of web hosting services
companies giving hosting services. They giving lot's of hosting plan as hosting packages... types of web hosting services. Can anyone explain me different types of web hosting services available these days? Thanks
Why to use Web Services
Why to use Web Services         Why to use Web Services Web services have the tendency of higher Interoperability
SOA and Web Services
SOA and Web Services SOA and Web Services Tutorials in this site... services. In this tutorial series we will provide many examples of Web services. You will learn how to develop, deploy and test the Web services using different
Why Web Services?
Why Web Services? In this section of WebServices tutorials series we will understand why Web Services are developed and what are the benefits of using Web Services for  the development of  Enterprise applications. Why
Quick introduction to web services
Quick introduction to web services         Introduction: Web services are becoming more and more popular. Web Services allows you to expose
Custom Website Programming Services
Custom Website Programming Services We offer custom website programming, testing and maintenance services. We have developed, tested and delivered many... and develop your website. We offer Custom Website Programming  services to our
Generating XML with Web Services - WebSevices
Generating XML with Web Services  How to Generate a XML file using Web Services in Java? I have Eclipse 3.2, Exadel Studio, Tomcat 6.0, Apache Ant 1.7.0, Axis 1.4? Using these things, How to get that done
web services in java - Java Beginners
web services in java  hello there, I want to develop a web site using java as platform.I have undergone the basic training in java. Could you please tell me how to proceed with it.The step by step procedure
Social Media Marketing Services
Social Media Marketing Services We are providing Social Media Marketing Services to our client all over the world. We help our client in making... Social Media Marketing portals. Our Social Media Marketing Services includes
Software Support Services, Application Support Solutions, Support and Maintenance Services and Solutions
Software Support Services from Rose India Rose India is prominent software and IT services provider with years of experience in providing capable software maintenance support and services to various organizations. Software services
Small Business Marketing Services
Small Business Marketing Services These days Small Business around the work... Services. The priority of Small Business is to find the best Small Business Marketing Services for promoting their website and online businesses. These days
Article Marketing Services,Article Marketing Services,Article Marketing Services in India
Article Marketing Services Outstanding articles dispersed to OVER 100... need the support of OUR WORLD –CLASS SERVICES. Our proficient content... reach before the viewers. RoseIndia services provides the facility of tailor
Web Promotion Services,Website Promotion Services,Website SEO Promotion Services India
Website Promotion Services If you have developed... the web promotion services with guaranteed success in the least charges. Why... various services. Website promotion services is one of them. Roseindia.net has
Web services with Lomboz
Web services with Lomboz      ... will discuss the Lomboz plug-in and its usability in developing web services... Web Services, Java, JEE and EJB applications. It provides comprehensive support
Mobile Application Development Services
Mobile Application Development Services Rose India Technologies is providing mobile application development services to individuals and corporates. We... based applications, Image processing applications, Web services based mobile
Web Services Tutorials and Links
Web Services Tutorials and Links Web services... to as Web services. The goal of the Web Services Activity is to develop a set of technologies in order to lead Web services to their full potential. The Web
PHP Software development Services
PHP Software development Services We provide PHP Software development services using latest development technologies. Our highly experienced PHP Development... Technologies Pvt. Ltd. provides PHP Software development services to clients
Types of Hosting Services
Types of Hosting Services   ... the different types of hosting services offered by web hosting companies. The knowledge of types of Hosting Services will help you in finding the correct hosting
iPad Application Development Services
iPad Application Development Services iPad Application Development services... development projects. We offer iPhone and iPad application development services to our... Application testing services. We follow the software quality management process
Web Services benefits
Web Services benefits         Here are the benefits of using Web Services... invoked using HTTP. So, Web Services allows you to expose
Website Development Services
Website Development Services We are IT company providing Website development and maintenance services. We employ latest technologies such as HTML5, CSS... Design Development and maintenance services in USA, India, Singapore, UK, USA
Advertisements
 

 

 

DMCA.com