teeluck
04-24-2007, 10:57 AM
Hi,
I am trying to connect my JSP page(work laptop) to a remote database on a server(home pc).
The server at home is online on dsl connection and i am using a DNS to connect to it.
NOTES:
home pc:
DNS : john.somedns.com
MySQL installed
Apache Tomcat
MySQL odbc driver
work pc:
DNS : work.somedns.com
MySQL installed
Apache Tomcat
MySQL odbc driver
My code:
<%@ page import="java.sql.*" %>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL = new String("john.somedns.com");
Connection databaseConnection = DriverManager.getConnection(sourceURL,"","");
Statement myStatement = databaseConnection.createStatement();
%>
What am I doing wrong?
What should I do?
Any suggestions and comments would be appreciated.
Thank You
I am trying to connect my JSP page(work laptop) to a remote database on a server(home pc).
The server at home is online on dsl connection and i am using a DNS to connect to it.
NOTES:
home pc:
DNS : john.somedns.com
MySQL installed
Apache Tomcat
MySQL odbc driver
work pc:
DNS : work.somedns.com
MySQL installed
Apache Tomcat
MySQL odbc driver
My code:
<%@ page import="java.sql.*" %>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL = new String("john.somedns.com");
Connection databaseConnection = DriverManager.getConnection(sourceURL,"","");
Statement myStatement = databaseConnection.createStatement();
%>
What am I doing wrong?
What should I do?
Any suggestions and comments would be appreciated.
Thank You