|
Home > Archive > SQL Server JDBC > January 2006 > SQL Server 2000 Driver for JDBC - Error establishing sockets
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SQL Server 2000 Driver for JDBC - Error establishing sockets
|
|
| venkat_matcha@yahoo.com 2006-01-02, 9:23 am |
| 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:sqlse
rver:// ServerName:1433;Data
baseName=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(Unkn
own 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. SQLServerImplConnect
ion.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(Unknow
n Source)
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection refused: connect
at java.sql.DriverManager. getConnection(Unknow
n 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...
| |
| Sue Purkis 2006-01-03, 1:23 pm |
| Hi Venkat,
Just to confirm. You list the following:
con1=DriverManager.getConnection(" jdbc:microsoft:sqlse
rver:// ServerName:1433;Data
baseName=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:sqlse
rver://10.11.12. 13:1433;DatabaseName
=dmo1o2d",user,password);
Sue Purkis
DataDirect Technologies
"venkat" <venkat_matcha@yahoo.com> wrote in message
news:eyPAZ36DGHA.344@TK2MSFTNGP11.phx.gbl...
> 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:sqlse
rver:// ServerName:1433;Data
baseName=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(Unkn
own 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. SQLServerImplConnect
ion.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(Unknow
n Source)
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]Connection refused: connect
> at java.sql.DriverManager. getConnection(Unknow
n 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...
|
|
|
|
|