Connecting Sybase to a localhost
843859Oct 28 2008 — edited Nov 20 2014Hi, I'm currently working on a project that requires me to use Sybase and JSP and starting from scratch and learning from scratch as well.
However, I am unable to connect my website to my own computer, meaning, the database (Sybase in this case) is loaded in my computer,
but I cannot connect my website to access the local database.
Currently, I have this:
Class.forName("com.sybase.jdbc3.jdbc.SybDriver");
Connection connection=DriverManager.getConnection("jdbc:sybase:Tds:localhost:/course","dba","sql");
Statement statement=connection.createStatement();
to establish a connection to my local server.
However, when i click on the site to try and connect to the server, all i get is a whole page of code.
What is wrong with the code above?
and lets say I want to upload the database and the site, where can I do it?
any help will be greatly appreciated.
Thanks in advance.