i havae problem java connection with sql server 2005 in windows authentication mode my code is as follows

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection connection = DriverManager
            .getConnection("jdbc:sqlserver://localhost:1433;database=dbName;integratedSecurity=true;");

Recommended Answers

What exactly is the problem. Please post the full text of any error messages.

Jump to Post

All 4 Replies

   Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection connection = DriverManager
  .getConnection("jdbc:sqlserver://localhost:1433;database=dbName;integratedSecurity=true;");

This may be relevant?

There are frequently equally valid synonyms for connection string syntax elements, but some syntax and spelling errors can cause problems. For example, "Integrated Security=true" is valid, whereas "IntegratedSecurity=true" causes an error.

Source

i want to connect sql server 2005 in windows authentication mode, i connect it by using jtds driver, but i do not want to use jtds driver and without it gives me an error while connecting databse,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.