I don’t use the Class.forName(abcde) for my MySQL-java-jdbc code. My code works properly.
All I did was drop the mysql.jar in my lib folder and the code worked.
But, for MSSQL, this does not work and I get the following error:
java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://localhost:1433
I am using both sqljdbc.jar and sqljdbc4.jar, java 1.6 and MSSQL 2008.
Can you tell me how to find the cause for this problem ?
I think you’ve got the database connection URL wrong. There should be no
microsoftwithin it. Tryjdbc:sqlserver://localhost:1433instead.See also the MSDN documentation for the SQL Server JDBC driver.