| | |
connecting to mssql with using jsp
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hi just started this new jsp course stuck in this so if you guys can please help would be very happy.The problem is this i am trying to make a jsp that asks for a username and a password and the thing is i am trying to put these datas into a database
cool idea ain't it all original
.but the problem is that i can't get connected to sql i don't know it just won't work bet i made millions of mistakes i am not aware of.Anyways a simple site to test it.My data base is named pass the and the password is pass to make it easy
.And i am usin an apache-tomcat 5.0.28 and a 1.4java thats all you need i thinks if you need more please post i am just a desperate student trying to learn
.Oh the code here it is...
P.S.:please help me don't just read and pass please pretty please:cry: :cheesy:
cool idea ain't it all original
.but the problem is that i can't get connected to sql i don't know it just won't work bet i made millions of mistakes i am not aware of.Anyways a simple site to test it.My data base is named pass the and the password is pass to make it easy
.And i am usin an apache-tomcat 5.0.28 and a 1.4java thats all you need i thinks if you need more please post i am just a desperate student trying to learn
.Oh the code here it is...P.S.:please help me don't just read and pass please pretty please:cry: :cheesy:
JSP Syntax (Toggle Plain Text)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a rel="nofollow" class="t" href="http://www.w3.org/TR/html4/loose.dtd" target="_blank">http://www.w3.org/TR/html4/loose.dtd</a>"> <html> <head> <title>Mr.Duke Is Back</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <% public void baglan(){ try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); conn=DriverManager.getConnection("jdbc:odbc:pass","pass","pass"); } catch (Exception ex) {%><% out.print("alert()"); %><%} String name=request.getParameter("name"); String pass=request.getParameter("password"); String sql="INSERT INTO pass (marka, tip, seri, fiyat, ekran)"; sql +=" VALUES (N'"+name+"', N'"+pass+"')"; %> <p align="center"><a href="register.htm" >Registration</a> <a href="login.htm">Log In</a> <a href="">Contact Us</a></p> <p align="center"> </p> <p align="center"><img src="duke_kahve_fincani.gif" width="96" height="112"></p> <p align="center"><font size="+3" color="#009933"><b>Disributor Network System</b></font> </p> <p align="center"><font size="+2" color="#009933"><b>Log In</b></font> </p> <form action="index2.htm"> <table> <tr> <td>Name:</td> <td><input name="name" type="text" size="25"></td> </tr> <tr> <td>Password:</td> <td><input name="password" type="password" size="25"></td> </tr> </table> <p align="center"> <input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"> </p> </form> <a href="register.htm">New members click here!</a> <p align="center" > <img src="computerbanner.gif" width="400" height="70"></p> <p > </p> </body> </html>
Last edited by johnroach1985; Oct 10th, 2004 at 2:11 pm. Reason: java changed to jsp
"By the data to date, there is only one animal in the Galaxy dangerous to man—man himself. So he must supply his own indispensable competition. He has no enemy to help him."
From Time Enough for Love by Robert A. Heinlein
From Time Enough for Love by Robert A. Heinlein
![]() |
Similar Threads
- Displaying blob images from database and display it on jsp (JSP)
- Connecting MIDlet,JSP and mysql database (Java)
- MSSQL Concurrency (MS SQL)
- Web Design, Graphics (Post your Resume)
- RPC server unavailable on installer connecting to MSSQL instance (MS SQL)
- JSP along database (JSP)
- Connecting to MSSQL in C++ program (C++)
Other Threads in the JSP Forum
- Previous Thread: checkbox values
- Next Thread: checking to see if a coupon has expired
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web





