Ask Experts Questions for FREE Help !
Ask
    norah1990's Avatar
    norah1990 Posts: 1, Reputation: 1
    New Member
     
    #1

    Mar 14, 2016, 11:55 AM
    Problem with java
    I download an open source code for Hotel Reservation System
    but I can't open it because error in connection with the database
    try
    {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:htl");

    }
    catch(Exception e)
    {
    t1.setText("Error in Connection ");
    }
    }
    CravenMorhead's Avatar
    CravenMorhead Posts: 4,532, Reputation: 1065
    Adult Sexuality Expert
     
    #2

    Mar 15, 2016, 08:49 AM
    Did you make sure that your database is setup the way the program wants it to be? Make sure it is setup?

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Java state and visibility problem [ 0 Answers ]

So I have the following code in Java: public class State { public static void main(String args) { final int DIV = 2; int number; int counter; { // *a*

Java if problem [ 1 Answers ]

public class Employee { public void mainfnt(){ try{ System.out.println("Enter First Name: "); Scanner obj=new Scanner(System.in); String Fname=obj.nextLine(); System.out.println("Enter Last Name: "); String Lname=obj.nextLine(); ...

Java Swing Problem [ 2 Answers ]

A JComboBox has constructors that can take a Vector or a ComboBoxModel. When I pass a DefaultComboBoxModel to it, and change the contents of the DefaultComboBoxModel, the drop-down list changes as expected. No problem. However, if I pass a Vector to it and change the contents of the...


View more questions Search