Error with Connection to JDBC MS SQL Server 2000

Hi,
I have this error:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]End of stream was detected on a read.
And here is my connection statment:
Connection conn = DriverManager.getConnection ("jdbc:microsoft:sqlserver://MYPC:8081","*****","*****");
Any ideas?
Many thanks in advance.

java.sql.SQLException: [Microsoft][SQLServer 2000
Driver for JDBC]End of stream was detected on a
read.
Any ideas?http://support.microsoft.com/?kbid=823896
if that doesn't work, try this:
http://www.mcse.ms/archive90-2005-9-1649153.html
thanks.
mp

Similar Messages

  • How to establish a trusted connection with JDBC for SQL SERVER 2000

    Hi!I am using jdk 1.4 and eclipse 3.3.
    I create a servlet in eclipse with in-build tomcat.
    When I run it ,it was working perfectlly has it was suppose to work.
    In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
    But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
    [Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
    for user 'sa'
    I searched around some post and found that ok ,I need trusted connection
    But I have 2 Questions
    1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
    2). How do I create a trusted connection with JDBC for SQL server 2000
    Thnaks for your help in advance.

    Hi! duffymo ,QussayNajjar ,dvohra09 .
    Thank for help.
    The ideas are really great.
    I am trying generate reports for my company.
    When I used eclipse the code worked perfectly.
    below is code which I used
    out.println("Calling For Class Name<br>");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    out.println("Calling For Class Name success Now calling database <br>");
    1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
    2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
    3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
    out.println("connecting to database success<br>");
    I had tried to connect the database using this three way.
    In 1st I tried using DSN name .
    Next 2 self explainer for expert like you.
    I used to 2nd variant to connect in eclipse and it worked fine.
    I not an expert in java ,I just doing some research on jasperReport.
    My best guest is that eclipse is using some library files of which I have no clue.
    Thank's for your help,I appretiate it.
    Once again thank a billion.
    Sorry for the messy righting.

  • JDBC Connection String for MS Sql Server 2000 with Instance Name

    Hi All,
    I am having problems connecting to a MS Sql Server 2000 database using MSSqlServer4
    driver when the database server has an Instance Name. If the database server has
    no instance name then I am able to connect using the connection string
    connection=jdbc:weblogic:mssqlserver4:hansa:1433
    But when I have the MS Sql Server DB with an instance name such as "TestInstance",
    then I am unable to connect with any of the connection strings given below
    connection=jdbc:weblogic:mssqlserver4:hansa\TestInstance:1433 or
    connection=jdbc:weblogic:mssqlserver4:hansa\\TestInstance:1433 or
    connection=jdbc:weblogic:mssqlserver4:hansa:TestInstance:1433 or
    connection=jdbc:weblogic:mssqlserver4:hansa:1433:TestInstance
    Can anybody help me in resolving this issue. Appreciate your help.
    Thanks in advance.
    Vikram

    Vikram wrote:
    Hi All,
    I am having problems connecting to a MS Sql Server 2000 database using MSSqlServer4
    driver when the database server has an Instance Name. If the database server has
    no instance name then I am able to connect using the connection string
    connection=jdbc:weblogic:mssqlserver4:hansa:1433
    But when I have the MS Sql Server DB with an instance name such as "TestInstance",
    then I am unable to connect with any of the connection strings given below
    connection=jdbc:weblogic:mssqlserver4:hansa\TestInstance:1433 or
    connection=jdbc:weblogic:mssqlserver4:hansa\\TestInstance:1433 or
    connection=jdbc:weblogic:mssqlserver4:hansa:TestInstance:1433 or
    connection=jdbc:weblogic:mssqlserver4:hansa:1433:TestInstance
    Can anybody help me in resolving this issue. Appreciate your help.Hi. No type-4 jdbc driver is going to be able to use a name for a DBMS instance.
    Let's assume you have two DBMS instances running on the machine hansa. One
    of them may be listening for tcp connections on port 1433, but the other must not.
    The other most be listening on some other port number you have chosen.
    Therefore, to choose which DBMS instance you want to connect to, use the
    working URL you have, and switch the port number as desired.
    Joe Weinstein
    >
    >
    Thanks in advance.
    Vikram

  • JDBC Connection between Unix and SQL Server 2000

    I have SQL Server 2000 installed in a pc as a data server and SQL Server 2000 JDBC Drive installed in a Unix machine. Both machines are connected and can ping each other. After setting up the environment data, I ran a test code to test the connection and got exceptions. ( I did the same process between a pc and the data server, it works well.)
    Attached are the test code and error message. Hope someone can help me.
    ******* Test Code ********
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test {
    public Test() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://<hostname>","<username>","<password>");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test test = new Test();
    ******* error message ********
    Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:64)
    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(Compiled Code)
    at java.sql.DriverManager.getConnection(DriverManager.java:137)
    at Test.<init>(Test.java:10)
    at Test.main(Test.java:32)
    ************ end of message ***********

    If it works from a PC and not from the Unix box then you may have a network issue of some sort, I.E. firewall not letting it through etc.
    Try using telnet on the Unix box to see if you can connect to the sql server on the port that the SQL server is listening.
    E.G.
    telnet server_name 1433
    You may need to change the port number to the one that the SQL server is using.
    Col

  • Cant create connection Pool for MS SQL Server 2000 with Microsoft Driver

    i am using bea weblogic server 6.1, i cant create connection pool while using MS
    SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft website. when
    i give the following class name for JDBC driver and the connection url and click
    apply while selecting the available server, a number of exception appears in default
    server (that is the connection pool cannot be created..... cannot load the driver
    class).
    URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
    Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
    when i use the above setting in a JDBC simple application in Jbuilder
    7.0 the application runs successfully and fetches the data deom MS SQL database
    but in at Bea connection Pool is not created with these settings. i do give appropriate
    username and password in properties field in connection pool. Thankx for any help!

    khabbab wrote:
    That was the original code part from "startweblogic" :
    :runWebLogic
    echo on
    set PATH=.\bin;%PATH%
    set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;
    echo off
    and i changed it to :
    :runWebLogic
    echo on
    set PATH=.\bin;%PATH%
    set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;D:\Program Files\Microsoft
    SQL Server 2000 Driver for JDBC\lib\msbase.jar;D:\Program Files\Microsoft SQL
    Server 2000 Driver for JDBC\lib\msutil.jar;D:\Program Files\Microsoft SQL Server
    2000 Driver for JDBC\lib\mssqlserver.jar;I suggest moving or copying the three ms driver jars to a directory that has no blanks
    in it so the classpath doesn't have blanks in it. Ie:
    go to the "D:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib"
    directory and do this:
    mkdir D:\microsoft_jdbc_driver
    cp *.jar D:\microsoft_jdbc_driver
    Then make the classpath include D:\microsoft_jdbc_driver\msbase.jar etc.
    Joe
    >
    >
    echo off
    when i save and run the bat file, server appears then disappears.
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    The class path which is echoed at server startup does not include thepaths to
    driver jar files. when i edited the "startweblogic.bat" file and includedthe
    driver class paths to jar files, now the server doesnot even run. tellme what
    to do now???Show me what change you made to the startweblogic file.
    Joe
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    kindly tell me how can i check that the class paths for driver jarfiles are included
    in that string? thanks. also tell me can not i use the jdriver forsql server
    2000?.The startup script will echo what it's doing, including printing out
    the classpath
    it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
    for
    basic JDBC, but the MS drivfer is preferable in some ways.
    Joe
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    i am using bea weblogic server 6.1, i cant create connection
    pool
    while
    using MS
    SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
    website.
    when
    i give the following class name for JDBC driver and the connectionurl and click
    apply while selecting the available server, a number of exception
    appears
    in default
    server (that is the connection pool cannot be created..... cannot
    load
    the driver
    class).The server startup script creates a string that will become the
    classpath
    for the server.
    This string is part of the java call to start the server with a-classpath
    argument. You need to
    make sure the MS driver jars are part of that classpath string.
    Joe
    URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
    Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
    when i use the above setting in a JDBC simple applicationin Jbuilder
    7.0 the application runs successfully and fetches the data deom
    MS
    SQL database
    but in at Bea connection Pool is not created with these settings.
    i
    do give appropriate
    username and password in properties field in connection pool.
    Thankx
    for any help!
    khabbab wrote:
    The class path which is echoed at server startup does not include thepaths to
    driver jar files. when i edited the "startweblogic.bat" file and includedthe
    driver class paths to jar files, now the server doesnot even run. tellme what
    to do now???
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    kindly tell me how can i check that the class paths for driver jarfiles are included
    in that string? thanks. also tell me can not i use the jdriver forsql server
    2000?.The startup script will echo what it's doing, including printing out
    the classpath
    it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
    for
    basic JDBC, but the MS drivfer is preferable in some ways.
    Joe
    Joseph Weinstein <[email protected]_this> wrote:
    khabbab wrote:
    i am using bea weblogic server 6.1, i cant create connection
    pool
    while
    using MS
    SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
    website.
    when
    i give the following class name for JDBC driver and the connectionurl and click
    apply while selecting the available server, a number of exception
    appears
    in default
    server (that is the connection pool cannot be created..... cannot
    load
    the driver
    class).The server startup script creates a string that will become the
    classpath
    for the server.
    This string is part of the java call to start the server with a-classpath
    argument. You need to
    make sure the MS driver jars are part of that classpath string.
    Joe
    URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
    Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
    when i use the above setting in a JDBC simple applicationin Jbuilder
    7.0 the application runs successfully and fetches the data deom
    MS
    SQL database
    but in at Bea connection Pool is not created with these settings.
    i
    do give appropriate
    username and password in properties field in connection pool.
    Thankx
    for any help!

  • Error Creating Connection Pool for Microsoft SQL Server

    I am trying to create a connection pool that connects to a MS SQl Server but it keeps giving me an error
    Unable to create : com.microsoft.sqlserver.jdbc.SQLServerDriver
    Missing class: com.microsoft.sqlserver.jdbc.SQLServerDriver Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils Loader: oc4j:10.1.3 Code-Source: /D:/jdevstudiobase1013/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\jdevstudiobase1013\j2ee\home\oc4j.jar This load was initiated at system.root:0.0.0 using the Class.forName() method. The missing class is not available from any code-source or loader in the system.
    I have added the Microsoft Jar to the D:/jdevstudiobase1013/j2ee/home/lib/ and also to D:/jdevstudiobase1013/j2ee/home/. Please any suggestion would be welcome

    I am trying to create a connection pool that connects to a MS SQl Server but it keeps giving me an error
    Unable to create : com.microsoft.sqlserver.jdbc.SQLServerDriver
    Missing class: com.microsoft.sqlserver.jdbc.SQLServerDriver Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils Loader: oc4j:10.1.3 Code-Source: /D:/jdevstudiobase1013/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in D:\jdevstudiobase1013\j2ee\home\oc4j.jar This load was initiated at system.root:0.0.0 using the Class.forName() method. The missing class is not available from any code-source or loader in the system.
    I have added the Microsoft Jar to the D:/jdevstudiobase1013/j2ee/home/lib/ and also to D:/jdevstudiobase1013/j2ee/home/. Please any suggestion would be welcome

  • Not able to connect to database(MS SQL Server 2000) through JSTL tag

    Hi,
    I just want to retrieve some data from the database through a JSP page.I am using JSTL tags the code is as shown below. Whenever i execute this code i get an error message like this
    My Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource"
    driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:mssqlserver:sqlserver://SYS57:1433;DatabaseName= sree"
         user=" "
         password=" "/>
    <sql:query var="res" dataSource="${datasource}">
    SELECT * FROM books
    </sql:query>
    <html>
      <head>
        <title>A First JSP Database</title>
      </head>
      <body>
        <table border="1">
          <tr>
            <td>id</td><td>title</td><td>price</td>
          </tr>
          <c:forEach items="${res.rows}" var="row">
          <tr>
            <td><c:out value="${row.id}" /></td>
            <td><c:out value="${row.name}" /></td>
            <td><c:out value="${row.author}" /></td>
          </tr>
          </c:forEach>
        </table>
      </body>
    </html>error is this:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "No suitable driver"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:93)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root cause
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "No suitable driver"
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:308)
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:192)
         org.apache.jsp.firstdb_jsp._jspx_meth_sql_query_0(org.apache.jsp.firstdb_jsp:132)
         org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I am not clear with url attribute of setDatasource tag... I feel the error is because of that line only..... Kindly tell me how to specify the jdbc URL for MS SQL Server 2000 while using JSTL tags for connection.
    Thanks,
    Akshatha

    unable to rectify the error........ tried lot but all in vain...still trying........
    my current code is:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource" driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://SYS57:1433;databaseName=sree" user="sa"
             password="dfgdfg"/>
    <sql:query var="res" dataSource="${datasource}">
      SELECT * FROM books
    </sql:query>
    <html>
      <head>
        <title>A First JSP Database</title>
      </head>
      <body>
        <table border="1">
          <tr>
            <td>id</td><td>title</td><td>price</td>
          </tr>
          <c:forEach items="${res.rows}" var="row">
          <tr>
            <td><c:out value="${row.id}" /></td>
            <td><c:out value="${row.name}" /></td>
            <td><c:out value="${row.author}" /></td>
          </tr>
          </c:forEach>
        </table>
      </body>
    </html>Thanks,
    Akshatha

  • JDBC - MS SQL Server 2000 Driver

    Do you need to have J2EE to run the MS downloaded SQL Server 2000 JDBC Driver? Currently have the J2SE installed with JDK 1.31_01 installed and keep getting errors where doesn't recognize a number of class objects. -- Thanks

    Do you need to have J2EE to run the MS downloaded SQL
    Server 2000 JDBC Driver? Currently have the J2SE
    installed with JDK 1.31_01 installed and keep getting
    errors where doesn't recognize a number of class
    objects. -- ThanksI did not have any problems on windows 2000 with SQL 7, J2SE 1.4 Beta 3. BUT You will have to re-jar the files since there is a corrupted jar file in their driver. This corruption is not fatal, but causes exceptions to be loggued.
    Did you load the driver with Class.forName ?

  • ODBC errors for Oracle Migration Workbench and SQL Server 2000 on Windows

    Hi all-
    I setup a new ODBC connection for the Oracle 10g Migration Workbench to MS SQL Server 2000 on Windows XP and keep getting the following errors when I try to
    either test the new ODBC connection to MS SQL Server 2000 for use with the Oracle Migration Workbench tool. Goal is to fix these errors so that I can migrate our test SQL Server 2000 databases to Oracle 10g.
    Current configuration
    - Oracle 10.1 Migration Workbench
    - Oracle 10g Database (target)
    - MS SQL Server 2000 (source database)
    -Windows XP
    -ODBC 3.85.1117 driver for Windows XP with SQL Server and Oracle
    Errors:
    I. When I test the ODBC connection:
    Microsoft SQL Server ODBC Driver Version 03.85.1117
    Running connectivity tests...
    Attempting connection
    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL server not found.
    TESTS FAILED!
    Now here is what has me totally confused:
    I can use the command line ISQL to access the database on the server and IP is all correct and port is available. So I can access the SQL Server database fine it is when I try to setup ODBC that it gives me problems.
    Any tips how to get this ODBC working?
    Thanks
    Ben Prusinski

    1. Jing Jin. If you had READ the post you would have seen that installing later versions is NOT an option.
    2. Not supported does NOT mean does NOT work, as Balmukund pointed out in the referenced thread.  The site that this databases supports is using ASP which is also NOT supported by Microsoft.  As it turns out Balmukund's solution actually turns
    out to be the correct solution.  I installed SS2K and its Service pack 4 on the machine last night.  Good answer Balmukund. as we say in the Navy, "BRAVO ZULU!!"  which means "WELL DONE!!
    3. Tom Li I just posted the question less than 48 hours ago.  My last post was less than 24 hours ago.  I think I have the right to be given the opportunity to determine whether a reply is the answer or not. I understand you don't like unanswered
    posts sitting around for weeks, months or years. (I don't like it either as I have a few that are still unanswered after several years.)  But you should not be showing replies as answers before I even get a chance to see them, much less try them out. 
    You should also not be showing replies as answers which don't address the criteria of the question.  I specifically stated that I had to install SS2K.  I went on to state, "And before anyone asks I need to install this version because that is what
    the customer is using and I need to duplicate their databases."  So the correct answer, if in fact SS2K did not work on Windows 7, would have been a virtual machine answer, as suggested on the thread Balmukund referenced.  So before you mark a reply
    as an answer read the question.
    Edward R. Joell MCSD MCDBA

  • Error in File to Jdbc(MS Sql Server)

    Error is like-----
    attemt to establish db connection failed with sql error com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL "jdbc:microsoft:sqlserver://HYDHTC65586:1433;DatabaseName=Northwind";
    SAPClassNotFoundException: com/microsoft.jdbc.sqlserver.SQLServerDriver
    Exception caught by adapter framework: Database connection couldn not be established
    I do not know how to configure
    MS Sql Server Drivers.Could you please give me details
    Thanks and Regards,
    Viswanath

    Hi,
    To install JDBC driver follow the how to guide.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20install%20and%20configure%20external%20drivers%20for%20jdbc%20and%20jms%20adapters.pdf
    JDBC Driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection = jdbc:microsoft:sqlserver://hostname:<port>;DatabaseName=<DBName>
    UserID and Password.
    Regards
    Seshagiri
    Edited by: N V Seshagiri on Feb 10, 2008 11:30 AM

  • Java.sql.SQLException: I/O Error: Connection reset on MS-SQL Server 2000

    Anybody able to help me with this Java-JDBC Problem?
    I'm creating a ResultSet and execute a query which approximatelly delivers me 11.000 rows.
    With the given ResultSet i'd like to move through the records forward only.
    In my while loop I'm able to reach ~9700 rows and then unexpectedly i get the error:
    java.sql.SQLException: I/O Error: Connection reset
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2277)
    at net.sourceforge.jtds.jdbc.TdsCore.getNextRow(TdsCore.java:761)
    at net.sourceforge.jtds.jdbc.JtdsResultSet.next(JtdsResultSet.java:593)
    at ag.oase.jobs.Datenschaufel.Betriebabgleich(Datenschaufel.java:1629)
    at ag.oase.jobs.Datenschaufel.main(Datenschaufel.java:183)
    Caused by:
    java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:197)
    at java.io.DataInputStream.readFully(DataInputStream.java:202)
    at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:860)
    at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:707)
    at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)
    at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)
    at net.sourceforge.jtds.jdbc.ResponseStream.readInt(ResponseStream.java:318)
    at net.sourceforge.jtds.jdbc.TdsData.readData(TdsData.java:680)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsRowToken(TdsCore.java:2968)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2236)
    ... 4 more
    I'm using the jTDS JDBC driver.
    I googled a lot but didn't found a solution for this problem?
    So please help me!
    Thanks in advance
    Ren�

    ...OWB repository cannot be installed into Oracle XE.
    Cheers
    David

  • How to connect Java and Microsoft SQL Server 2000

    hi,
    could anyone please teach me how to connect Java and SQL Sever 2000?? if possible could you guys provide me with an example??? i could hardly find any relevant resources about it...
    Thanks ~!

    thanks for the information...
    by the way hv any working module on it?? i'm new to
    both Java and Microsoft SQL Server... Thanks againFirst things first... you should read this:
    http://java.sun.com/docs/books/tutorial/jdbc/
    This is microsofts official JDBC Driver: http://www.microsoft.com/sql/downloads/jdbcregister.asp
    Install it and the documentation has some usage examples

  • Jdbc-bridge-sql server 2000

    Hi all,
    I have been developed a web application for bank reporting purpose,
    here are some java classes, and all the DB connections ceated and controlled in these classes,
    in my project, I am using bridge method for connecting to DB, the syntax of connection code is below:
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Properties props = new Properties();
    props.put("DatabaseName","CreditCard");
    //props.put("characterEncoding", "UTF-8");
    //props.put("useUnicode", "true");
    props.put("user", "sa");
    props.put("password", "");
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433", props);
    when in the url I use "localhost", the program works properly, but when I change the ip to other computer, I receive this error:
    [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket
    Note that I have access to this computer, I can ping it and ...
    please help me dear workmates...
    Best,
    Robin

    "I am using bridge method for connecting to DB" - when you say "bridge", it makes me think of the JDBC-ODBC bridge driver.
    But the class name you're using is the M$ SQL Server JDBC driver. Your language confuses me a little.
    When I connect to SQL server, I give it the name of the database, too. You don't. Maybe you should. Mine would look like this:
    String url = "jdbc:microsoft:sqlserver://host:1433/database;selectmethod=cursor";
    Connection connection = DriverManager.getConnection(url, username, password);Can you telnet ip-address 1433 successfully? You're sure that the listener is up and running?
    I'd put another property into those props: "selectmethod=cursor", or do it as I suggested above. - MOD

  • Connect oracle forms to sql server 2000

    Kindly tell me what kinds of scripts i have to install in SQL Server.

    Hi,
    You have 2 major options:
    1. Use Generic Connectivity with your Oracle 9i database running on Solaris. However it requires a proper ODBC-Driver to be installed on Solaris capable of connecting to Microsoft SQL Server
    MetaLink DocID: 245549.1 - How to setup Generic Connectivity - HSODBC - on SUN Solaris
    Remark: Oracle 9i has been de-supported, should you run into new bugs they wouldn't be fixed by Oracle
    2. Install and use the Database Gateway for ODBC 11g on the same machine which hosts the SQL Server database. Usage of this gateway is included in the Oracle database license. DG4ODBC also requires an ODBC-Driver but this one is mostly already present.
    Another option would be to install the Database Gateway for MS SQL Server (DG4MSQL) 11g on the same machine which hosts the SQL Server database. However this gateway requires an additional license. The big advantage of this gateway over DG4ODBC is that it supports the two phase commit protocol (distributed updates) and calling of SQL Server stored procedures. Also the dataype mapping is better compared to DG4ODBC.
    One thing though; in order for you Oracle 9i database to cooperate with one of the 11g gateways a patch for bug 5965763 on top of 9.2.0.8.0 is required. See also MetaLink DocID: 457808.1 for more details.
    I hope this get you going.
    Regards,
    Ed

  • Error happened during the migration from sql server 2000 to oracle 8.1.7

    /*[SPCONV-ERR(18)]:CREATE TABLE TT_CHANP1 statement passed to ddl file*/
    DELETE FROM TT_CHANP1;
    error as above.
    note:
    chanp1 is a temporary table under sql 2000
    syntax:
    create table #chanp1 (chanpid varchar(50))
    we try the codes:
    CREATE TEMP TABLE chanp1
    Error: PLS-00103: "CREATE"
    begin declare end exception
    exit for goto if loop mod null pragma raise return select update while
    <an identifier><a double-quoted delimited-identifier>
    <a bind variable><<close current delete fetch lock insert open
    roll back save point set sql execute commit for all
    <a single-quoted SQL string>
    Line: 63
    we try " CREATE GLOBAL TEMPORARY TABLE chanp1" again.
    but error .

    it seems like you are trying to perform a DDL from within the PL/SQL code, which is not allowed directly.
    You could use EXECUTE IMMEDIATE within your pl/sql code to perform a DDL statement.

Maybe you are looking for