Results 1 to 2 of 2

Thread: SQL Server 2005 Jdbc connection

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    15

    SQL Server 2005 Jdbc connection

    just have a small question and I was wondering if you could help me out with it? I'm using a JSP page to connect up to the database on the server. I have the JDBC driver and am trying to connect from my machine to SQL Server 2005 on our server. The thing is I'm having a little trouble with the connection string.
    (i am using the Microsoft SQL Server 2005 JDBC Driver)

    Can you use Windows Authentication when using the connection string?

    Also i tried using a SQL Server connection but it gave me the error : "com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'Matt'. The user is not associated with a trusted SQL Server connection. "

    This is the connection string

    Connection connection1 = java.sql.DriverManager.getConnection("jdbc:sqlserver://"server":1433;Database=BusinessDatabase;User=Matt;Password=testpass");

    (obviously "server" is replaced with the server name)

    can you set it up for windows authentication?

    thanks for any help anyone can give me with this!

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: SQL Server 2005 Jdbc connection

    I don't think you can use windows authentication when using the JDBC.

    to make your connection url work, the user "Matt" must be enabled on the Server with access to the Master DB. If that's not what you want take a look at this article on how to make your JDBC connection url for SQL Server 2005
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width