Re: SQL Server 2000 Driver for JDBC - Error establishing sockets
- From: "Sue Purkis" <suepurkis@xxxxxxxxx>
- Date: Tue, 3 Jan 2006 14:14:26 -0500
Hi Venkat,
Just to confirm. You list the following:
con1=DriverManager.getConnection("jdbc:microsoft:sqlserver://ServerName:1433;DatabaseName=dmo1o2d",user,password);
Is the name of the machine on which the SQL Server database named
SeverName? If not, you should replace ServerName with the name of the
macine or the IP address of the machine. For example:
con1=DriverManager.getConnection("jdbc:microsoft:sqlserver://10.11.12.13:1433;DatabaseName=dmo1o2d",user,password);
Sue Purkis
DataDirect Technologies
"venkat" <venkat_matcha@xxxxxxxxx> wrote in message
news:eyPAZ36DGHA.344@xxxxxxxxxxxxxxxxxxxxxxx
> Hi there
>
> I am using Microsoft SQL Server 2000 Driver for JDBC to connect to SQL
> Sever 2000. It is just a test application to see if it would connect to
> the datacase successfully. But I got the following errors. I already set
> up the classpath and installed all SQL Server 2000 Driver for JDBC sp 3.
> Dont know why it still failed...can anyone help me out of this? Thanks.
>
> When i am using simple JDBC-ODBC bridge Driver it's working fine.
>
> For this Server Pack3 , i have checked every thing like--
>
> TCP / IP Poart is Enable.
>
> I am working in client machine, my MSSQLServer 2000 Placed in server
> Machine.
>
> when i am giving Telnet ServerIP 1433 it's giving following response.
> connecting to ServerIP ....... could not open connection to the host , on
> port 1433:connection Failed
>
> My Sample Code is :--
>
> String user="sa";
> String password="imcindia";
> Connection con1 = null;
> CallableStatement cstmt = null;
> -----------
> Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
> con1=DriverManager.getConnection("jdbc:microsoft:sqlserver://ServerName:1433;DatabaseName=dmo1o2d",user,password);
>
>
> Statement st=con1.createStatement();
> st.execute("use dm0102d");
> st.execute("setuser 'dm01012'");
> ----------------------
>
> cstmt = con1.prepareCall("{?=Call
> dms_ex_create_folder('ABC','18753','NB21','u')}");
>
> ----------------------
>
> cstmt.execute();
>
>
> Here are Error Code :
>
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
> establishing socket.
> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
> at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
> Source)
> at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
> Source)
> at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
> at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
> at java.sql.DriverManager.getConnection(Unknown Source)
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]Connection refused: connect
> at java.sql.DriverManager.getConnection(Unknown Source)
> at TestConnection1.main(TestConnection1.java:24)
>
> one can help me to over come this problm,
>
> Thanks in advance.
> venkat
>
>
> **********************************************************************
> Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP &
> ASP.NET resources...
.
- References:
- SQL Server 2000 Driver for JDBC - Error establishing sockets
- From: venkat_matcha@xxxxxxxxx
- SQL Server 2000 Driver for JDBC - Error establishing sockets
- Prev by Date: SQL Server 2000 Driver for JDBC - Error establishing sockets
- Next by Date: Re: Possible Type Conversion Defect
- Previous by thread: SQL Server 2000 Driver for JDBC - Error establishing sockets
- Next by thread: Re: Possible Type Conversion Defect
- Index(es):
Relevant Pages
|