Click here to Skip to main content
15,917,926 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi frnds am strucking and i cant geting for inserting values into mysql by dynamically,so if pls help me if anybody..as possible early.thanks..

code is:

XML
<%
 String companyName=request.getParameter("cname");
 String companyAddress=request.getParameter("caddress");
 String city=request.getParameter("city");
 String country=request.getParameter("country");
 String zip=request.getParameter("zip");
 %>
 <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/dmd"
    user="root"  password="root"/>

    <sql:update dataSource="${snapshot }" var="result">
    insert into dmd.company(companyName,companyAddress,city,country,zip) values('?','?','?','?','?');

    </sql:update>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900