![]() |
| ||
| JSP connection to database hi guys hope you can help well im tryin to connect my jsp to my database, im uisng tomcat 5 and have stored the MS access database in my ROOT folder. i have created a User DNS, and have sdk 1.4.2_08 installed Problem is im not sure what to do now?? do i have to install a sun driver? if so how? and finally how do i connect to teh database? Please help thanks! x |
| ||
| Re: JSP connection to database Hi nelly No need to do much I hope u are aware of JDBC-ODBC Driver and they are supported by sdk1.4 First create a DSN using ODBC in control pannel later for JSP to connect to Database use the following code <% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection conn = DriverManager.getConnection("jdbc:odbc:<DSN name>") % provide DSN name after the second colon. In this way you are connected to your data base and you can futher query your database using statement object . For futher help mail adityabakle@gmail.com |
| All times are GMT -4. The time now is 2:25 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC