-
help me..its urgent...
plz let me know how to insert multiple values from the form for the single database column..below i have used query for the single values for the single database coulumn and its working...but how to insert multiple values in a database at a one time.
Statement s=conn.createStatement();
Code = request.getParameter("code");
Description = request.getParameter("Description");//takes values from forms
Dr_Amount=request.getParameter("DrAmount");
Cr_Amount=request.getParameter("CrAmount");
Type = request.getParameter("type");
Pct=request.getParameter("pct");
sql1 = "insert into gl_mast values (" + "'" + Code + "', '" + Description + "' , '" + Dr_Amount + "', '" + Cr_Amount + "', '" + Type + "', '" + Pct + "')" ;
s.executeUpdate(sql1);
sql = conn.prepareStatement("SELECT * FROM gl_mast WHERE gl_code = '" + Code + "'");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks