I have made every setting required for it changed the vip setting and tcp/ip setting in sql server configuration manager. Made the dynamic port to 1433.
Still i get this error. I am not able to connect to sql server while an instance is always running when i am making connection.
this is the error i got every time.
Cannot establish a connection to jdbc:sqlserver://DANISH-PC\SQLEXPRESS:1433;databaseName=Student_Data using com.microsoft.sqlserver.jdbc.SQLServerDriver (The TCP/IP connection to the host DANISH-PC, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".)
through this code i want to insert data
<sql:setDataSource var="Stddata" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://DANISH-PC\SQLEXPRESS:1433;databaseName=StudentData"
user="danish-PC/danish"
password=""/>
<sql:update dataSource="${Stddata}" scope="page" >
INSERT INTO Student (Name,FatherName,Class_No,Address,Phone)
Values(<sql:param value="${param.value}}"></sql:param>,
<sql:param value="${param.value}}"></sql:param>,
<sql:param value="${param.value}}"></sql:param>,
<sql:param value="${param.value}}"></sql:param>,
<sql:param value="${param.value}}"></sql:param>
)
</sql:update>