Re: [java ee programming] JDBC Connection error

2009-12-25 Thread Ali Ekber Çelik
Hi, You must add sql server jdbc jar file to classpath(your java home/jre/lib/ext).Also you must set your sqlserver config.(in configuration manager,set connection port as 1433).And you must specify a username and password.And try it again.if you get en exception again,write again. import java.s

Re: [java ee programming] JDBC Connection error

2009-12-25 Thread sher alam
1. Check this string: *String connectionUrl = "jdbc:sqlserver:MAY BE PORT NUMBER MISSING //localhost;**database=AdventureWorks;**integratedSecurity=true;";*Like for Mysql server the port number is 3306. 2. Do you have Connector. Check that you have the right connector for jdbc. To avoid this comp

[java ee programming] JDBC Connection error

2009-12-24 Thread bijesh shyanth
Hi I was just trying to run this program import java.sql.*; public class JDBCDemo { //    private Connection con;     public static void main(String[] str){ new JDBCDemo().connect();     }     private void connect(){     try{     Class.forName("com.microsoft.sqlserver.jdbc.SQLSer