1

I am currently taking over a web development project that was done 5 years ago. Basically, I was told to remote login to a web server running Windows Server 2003 and continue with the web development.

However, I want to access the backend database in order to perform SQL queries and see all the tables in my website.

I managed to find the .html, .jsp pages which is located at C:\Program Files\Apache Foundation\Tomcat5.5\webapps\root. I also managed to get snippets of the code which might be of help.

--

<%@page language="java" import="java.sql.*" %>
<%@page import="javax.servlet.*"%>

<%
String sDBDriver="sun.jdbc.odbc.JdbcOdbcDriver";
String sConnStr="jdbc:odbc:tutoring";
Connection conn=null;
ResultSet rs=null;
String username="username";
String password="heyicanttelluthepassword";

conn=DriverManager.getConnection(sConnStr,username,password);
Statement stmt=conn.createStatement();
%>

--

Any idea how the hell I can access the database? I don't even know if it uses MS SQL sever or MYSQL..Haha..

JosefAssad
  • 4,018
  • 28
  • 37
Ferrino
  • 53
  • 1
  • 10
  • I don't know much about java and odbc and windows so I'll put this in a comment instead of an answer because it's likely wrong. The Java code is calling an ODBC source called tutoring. Think of ODBC as a wrapper/abstraction for a specific DB connection. You need to look at the definition of that ODBC source in the windows control panel. This link is probably useful: http://superuser.com/questions/316076/how-do-i-configure-odbc-dsns-in-windows-server-2003-and-windows-7 – JosefAssad Sep 09 '12 at 14:28
  • Not to worry. Every details you give me will slowly make me get closer to my answer. :) – Ferrino Sep 10 '12 at 05:00

0 Answers0