java.sql.SqlException : No Suitable drive error while connecting to Sql2005
Hi everybody,
I am using JBuilder for java application and using Microsoft Sql Server 2005 for database transactions.
I have created a simple application which will connect to database ( windows authentication). It is giving me java.sql.SqlException: No Suitable driver error.
Here is the piece of code which I have written for database connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = " jdbc:sqlserver://localhost:1433;IntegratedSecurity=true";
Connection con = DriverManager.getConnection(connectionUrl);
Please help me in fixing this issue
Thanks
purnima
[668 byte] By [
purnimata] at [2007-11-26 22:58:01]

# 1
As far as I know, you cannot connect by JDBC using integrated security, you can only connect with a username & password, which you create and grant rights to in MSSQL2005. The "Integrated Security=true" is typical to MS Visula Studio Connection Strings, not JDBC ones.
Something else that I have seen, although I could be wrong, is that you cannot connect using a user name with a password with JDBC to MSSQL2005, unless the user has been granted the syadmin server role in MSSQL2005 Logins.
I hope this helps!
# 2
i think your url may not be correct
if jdbc documentation the url pattern should be like this
"url","username","password"
i.e
Connection con=DriverManager.getConnection("str1","str2","str3");
str1 -for oracle-jdbc:oracle:thin:@localhost:1521:xe
str2usernamescott
str3password-tiger