Announcement Announcement Module
Collapse
No announcement yet.
Using DriverManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using DriverManager

    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("oracle.jdbc.driver. OracleDriver");
    dataSource.setUrl("jdbc:oracle:thin://localhost:");
    dataSource.setUsername(xxxxxxx");
    dataSource.setPassword("xxxxx");

    I'm having some trouble trying to get this to work. Any suggestions?

  • #2
    Please use [ code][/code ] tags when posting code.

    Why are you using it programmatically and what trouble do you have? Being a bit more specific will help...

    Comment


    • #3
      Sorry I have never program in frameworks. One thing that must be done is using a datasource to connect to a oracle database. And there wasn't a forum around for install questions. I also need to know if u have to install springs. Otherwise, all I have done is downloaded the file and used the jars in my program.

      Anyhow, I was going through a tutorial for springs and it said this is how you connect to a datasource. Username and password is not a problem but getting the classpath and possible the URL is being a pain in the neck.

      Comment


      • #4
        I suggest read the reference guide and take a look at the tutorial. Start with the basics first before trying anything else. If you don't understand what you are doing you probably are going to break more then you solve.

        Spring isn't a program or something like that it is just a framework (like hibernate and others) no installation just use the jars...

        Comment


        • #5
          thanks....

          Comment

          Working...
          X