文档介绍:×÷Õߣº°¢ÍÁ²®
email: lu1206@
ÈÕÆÚ£º2001-1-5 11:04:15
I have given you the source code, how to connect with database from jsp. this is easy and and paste the below code and modify according to your is esspecially for those who had coding experience in have given proper documentation.
<!--first we've to import the necessary packages-->
<!--importing packages starts-->
<%@ page info="database handler"%>
<%@ page import=".*"%>
<%@ page import=".*"%>
<%@ page import=".*"%>
<%@ page import=".*"%>
<%@ page import=".*"%>
<!--importing packages ends-->
<%
try
{
//loading the drivers
//this code loads JDBD-ODBC Driver
("");
//making connection
//The second step in establishing a connection is to have the appropriate
//driver connect to the DBMS. The following line of code illustrates the
//general idea:
String url="jdbc:odbc:test";
//where "test" is the system dsn name
Connection con=(url, "administrator", "password");
//where "administrator is the username to
//access the database