-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconnect.jsp
30 lines (24 loc) · 883 Bytes
/
connect.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<title>SHEDS</title><%@ page import="java.sql.*"%>
<%@ page import="java.util.*" %>
<%
Connection connection = null;
try {
// ORACLE DBASE CONECTIVITY
/*
Class.forName("oracle.jdbc.driver.OracleDriver");
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
connection = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:insurance","scott", "tiger");
//MY SQL DBASE CONNECTIVITY
Class.forName("com.mysql.jdbc.Driver");
Connection=DriverManager.getConnection("jdbc:mysql://localhost:5053/AMES");
*/
// MS ACCESS and MYSQL DBASE CONNECTIVITY
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/charm","root","root");
String sql="";
}
catch(Exception e)
{
System.out.println(e);
}
%>