Re: SQL Server 2000 Driver for JDBC - Error establishing sockets



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...


.



Relevant Pages

  • Re: accessing data mining model via web/PDA
    ... Is your OPENROWSET clause connecting to a SQL Server 2000 database? ... Is your SQL Server instance running on the same machine as your Analysis ... i need some> help for the connection string, let say to access the> mining model in the AS. ...
    (microsoft.public.sqlserver.datamining)
  • Re: VB Express SQL Express Remote Connection
    ... Yes I can connect using the SQL Server Management Studio Express Tool. ... I changed my connection to exactly what you specified and it connected. ... I can connect and create databases on the Remote Server ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to Direct connect with ActiveSync
    ... That won't work because you have a connection string that can't be correct. ... You're saying that the database is, but it's not; ... Server 2000, Visual Studio 2008. ... Again sorry if this should be in another form but you say that SQL Server ...
    (microsoft.public.sqlserver.ce)
  • .Net Scalability problem
    ... I finished a Great project using .Net and SQL Server and .Net Mobile ... Million concurrent users ... So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.sqlserver.connect)
  • Re: Communication Link Failure Error
    ... On disconnection from the network, in my code I changed the connection ... string to use SQLOLEDB and sent a SQL query to SQL server which failed as ... unplug the network cable from the client machine and put the cable ...
    (microsoft.public.data.ado)