Can't registerOutParameter of cursor type in SQL Server 2000

Hi, there,
I'm using SQL Server 2000 and a type 4 JDBC driver for it from JRun 3.1. I wrote a stored procedure which has a Cursor (ResultSet) as an output parameter. But I used callStmt.registerOutParameter(1, java.sql.Types.OTHER);
I got an exception:
callable stmt class: allaire.jrun.db.jdbc.base.BaseCallableStatement
java.sql.SQLException: [JRun][SQLServer JDBC Driver]The specified SQL type is not supported by this driver.
I definitely want the cursor to be an output parameter in my SQL 2000 store procedure, rather than defining a store procedure without an output Cursor parameter and then use callStmt.getResultSet();
Does any one knows a way to register an output parameter of type CURSOR in SQL Server 2000 JDBC?
I know that with in Oracle JDBC driver, you can do this:
callStmt.registerOutParameter(1, OracleTypes.CURSOR);
ButI failed to find a equivalent in SQL Server 2000 JDBC driver.
Thanks a lot.

If you found any solution to this, would you please let me know too? It'll help a tonne.

Similar Messages

  • Retrieving Image Data Type from SQL Server 2000

    I'm trying to retrieve an Image using getBinaryStream() like descripbed in below code and encounter an error :
    java.lang.ClassCastException: com.microsoft.jdbc.base.BaseInputStreamWrapper
    What've I done wrong? Please help
    if(rs.next()){
                        fisAssyChart = (FileInputStream)rs.getBinaryStream("file_assembly_chat");
                        fisPPO = (FileInputStream)rs.getBinaryStream("file_ppo");
                        filePPO = new File(rs.getString("nama_file_ppo"));                    
                        fileAssyChart = new File(rs.getString("nama_file_assembly_chat"));                                                            
                   }Thx in advance
    David

    Oracle Migration Workbench:
    http://www.oracle.com/technology/tech/migration/workbench/index.html
    Cheers, OTN

  • JDBC driver for MS SQL Server 2000??

    I'm moving to weblogic 8.1 (from 7.0), and am facing a series of problems.
    This one is related to JDBC driver. The driver(from Microsoft) I used with weblogic
    7.0 doesn't work with 8.1. The exception I get when I try to execute a statement
    is:
    [ java.sql.SQLException: This JDBC 2.0 method is not implemented ]
    I figured that the driver doesn't support JDK 1.4. So, I tried using BEA driver
    that come with 8.1, but it fails while executing a prepared statement.
    Here's the stack trace:
    java.sql.SQLException: [BEA][SQLServer JDBC Driver]Invalid parameter binding(s).
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.preImplExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.downgradeAndRetryExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
         at com.actiontech.jmetro.util.sql.DBSession.executePreparedQuery(DBSession.java:167)
    Does anyone know what the problem is? Everything worked fine on 7.0. Or can anyone
    suggest a good driver for SQL server 2000 that works with weblogic 8.1/jdk 1.4?
    TIA
    Vas

    Today everything seems to be working fine!
    All I did was clean up weblogic directories, restart the server, close & reopen
    my IDE and redeploy my application. The problem just disappeared. I couldn't believe
    it, so I kept hammering it (redeploying and running testcases) .. and after several
    cycles.. got the problem again. Did the cleanup again.. and things are ok. So,
    I guess nothing wrong with the JDBC drivers(although the one from Microsoft doesn't
    support JDK1.4 officially), and its the weblogic that needs some cleanup time
    to time. Don't know if this happens only in dev mode, but if it happens in production
    mode also, then its another serious problem.
    Thanks a lot guys.
    "vas pulipati" <[email protected]> wrote:
    >
    I'm moving to weblogic 8.1 (from 7.0), and am facing a series of problems.
    This one is related to JDBC driver. The driver(from Microsoft) I used
    with weblogic
    7.0 doesn't work with 8.1. The exception I get when I try to execute
    a statement
    is:
    [ java.sql.SQLException: This JDBC 2.0 method is not implemented ]
    I figured that the driver doesn't support JDK 1.4. So, I tried using
    BEA driver
    that come with 8.1, but it fails while executing a prepared statement.
    Here's the stack trace:
    java.sql.SQLException: [BEA][SQLServer JDBC Driver]Invalid parameter
    binding(s).
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown
    Source)
         at weblogic.jdbc.base.BasePreparedStatement.validateParameters(Unknown
    Source)
         at weblogic.jdbc.base.BasePreparedStatement.preImplExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.downgradeAndRetryExecute(Unknown
    Source)
         at weblogic.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
         at com.actiontech.jmetro.util.sql.DBSession.executePreparedQuery(DBSession.java:167)
    Does anyone know what the problem is? Everything worked fine on 7.0.
    Or can anyone
    suggest a good driver for SQL server 2000 that works with weblogic 8.1/jdk
    1.4?
    TIA
    Vas

  • JDBC for MS SQL Server 2000

    Hi all, i'm newbie here and i have some problems doing with Java for my Final Project, just for my graduation...
    Here's the problem ...
    First i install the JDK 1.5 and MS SQL Server 2000. And then i also install JDBC for MS SQL Server 2000 sp3. Than i'm doing some experiments with JDBC, but its result error that i couldnt understand how to fixed it...
    I'm asking is JDBC for MS SQL Server 2000 sp3 doesn't support j2ee 1.5.0 and where i can find native driver jdbc for MS SQL Server 2000.
    Please help me....

    Than i'm doing some experiments with JDBC, but
    its result error that i couldnt understand This is the most important part of your post yet you don't seem to recognize it as such.
    Tell us what the error is. Not what you think it is. Exactlly what it says. And please provide a relevent, formatted snippet of code.

  • SQL Server 2000 and JDBC,Registering cursor as OUT param

    hi
    I am using JDK1.4,SQL Server 2000 and Microsoft's JDBC driver.
    I am stuck in accessing cursors.
    The SP i wrote is
    USE pubs
    IF EXISTS (SELECT name FROM sysobjects
    WHERE name = 'spSelectEmployees' and type = 'P')
    DROP PROCEDURE spSelectEmployees
    GO
    CREATE PROCEDURE spSelectEmployees @emp_cursor CURSOR VARYING OUTPUT
    AS
    SET @emp_cursor = CURSOR
    FORWARD_ONLY STATIC FOR
    SELECT *
    FROM employee
    OPEN @emp_cursor
    GO
    The problem I face is that when i register the output param in java code,what datatype do I specify..code is written below.
    calStmt = conn.prepareCall("{CALL pubs.dbo.spSelectEmployees(?)}", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    calStmt.registerOutParameter(1,Types.?????);-->What goes here???
    java.sql.Types does not give any datatype for cursor or object.Any one knows if there is an extended type given by Microsoft Driver??

    I am using JDK1.4,SQL Server 2000 and Microsoft's JDBC driver. Premably for 2000. Numerous posts here suggests that driver has problems. The jTDS driver would be a better choice.
    java.sql.Types does not give any datatype for cursor or object.Any one knows if there is an extended type given by Microsoft Driver??You are correct that it would require a driver specific type. I have no idea what it is.
    Why don't you modify the proc to return a result set.

  • Can not extract data into BW from SQL SERVER

    Dear All,
      I meet a problem to extract data from database(MS SQL Server 2000(sp3)) into BW now and can not extract data into BW ODS, even PSA, In the monitor, display yellow light(0 from 0 record), detail message just display message "data request arranged" "confirmed with: confirmation" in requests(message) step; "missing message: request received" in extract (message)  step; "no data" in processing(data packet) step and so on. but in fact, there are two records in my database test table and DB connection is OK. Even I can extract data from another test oracle database into BW ODS successfully.
       Our BW system has two BW applicaton server and use oracle database. the one application server locates on IBM AIX host. the another one locates on one NT server. the application server on NT server is used for data extration from MS SQL SERVER  database into BW oracle database. and MS SQL SERVER and NT platform application server locate on same one host. DBSL was installed on the NT application server already. and DB connector also was created successfully for MS SQL SERVER and datasource also was generated. DBSL type is Kernel640-WIN-IA32bit-unicode. my BW system is ECC5.0/UNICODE/ORACLE. all table/view/field name of MS SQL server is upcase and have not any specific character. for example: ZDEMO etc.
    wait your help.
    Thanks in advance.
    Billy

    Hi  Ravi,
    Could you help me to get knowledge about the followings:
    approximately how many records    extracting and transfering  from SAP R/3 to BIW  in an organisation. for that how much time  will take .
    How to extract data from  two are three source system  to BIW. Kindly help me with step by step explanation .If any screen shots with documents pls fwd to my ID. "[email protected]"
    Your help highly appreciated.
    Thanks.
    Hema

  • Sql server 2000 data type

    In sql server 2000, what data type do I use for a field that
    needs to show two decimal places? It is a weight field, so the
    weight in ounces could be something like 12.25 and it needs to
    store it this way in the database. I'm kind of new to sql server,
    so any help would be greatly appreciated!

    You asked "In sql server 2000, what data type do I use for a
    field that needs to show two decimal places?" and I answered
    "decimal and numeric". How much clearer could I be?
    Numeric data types with fixed precision and scale.
    decimal[(p[, s])] and numeric[(p[, s])]
    Fixed precision and scale numbers. When maximum precision is
    used, valid values are from - 10^38 +1 through 10^38 - 1. The
    SQL-92 synonyms for decimal are dec and dec(p, s).
    p (precision)
    Specifies the maximum total number of decimal digits that can
    be stored, both to the left and to the right of the decimal point.
    The precision must be a value from 1 through the maximum precision.
    The maximum precision is 38.
    s (scale)
    Specifies the maximum number of decimal digits that can be
    stored to the right of the decimal point. Scale must be a value
    from 0 through p. The default scale is 0; therefore, 0 <= s
    <= p. Maximum storage sizes vary, based on the precision.
    I recommend that you load SQL Server Books Online on your
    computer, as it is available free from Microsoft as a download and
    it has everything you will probably need to know about SQL Server.
    Or you could just use the online version at
    SQL
    Server 2000 Books Online
    Phil

  • Dealing with the DATE data type in SQL Server

    As you know, a date is stored in SQL Server as "yyyy-mm-dd" when using the DATE data type.  This is also how it displays when I pull it into my Access front-end (even if I set the field's format to Short Date.)
    I'd like to be able to display it based on the user's regional settings.  I know I can use the FORMAT method in VBA to change it to mm/dd/yyyy, but I have users in other countries and I don't want to have to maintain a number of different versions.
    Any idea how I can automatically display the date in my MS Access form based on the user's regional settings?
    Thanks.

    Your solution, however, does not address the root of the problem. Access thinks it is a text field because there is no such thing as a 'Date' data type in Access. You will run into problems anywhere in Access, that you expect it to perform as
    a Date/Time field. E.G. sorting, filtering. 'Date' is one of the newer data types in SQL Server 2008+. You should be using SQL Server DateTime or SmallDateTime data type. Access will recognize those as a Date/Time data type and treat them accordingly.

  • SQL Server 2000 SP3 and jdbc type 4 drivers

    hi all,
    Has anybody had any problems using the type 4 jdbc drivers for SQL Server2000 after you upgraded the SQL Server 2000 with the latest Service Pack SP3 ??
    Please reply..
    cheers,
    -Jer

    hi shilohcity,
    i did have some problem when i updated my sql server to sp3. The driver i was using.., Atinav's aveConnect3, didn't connect and was throwing exceptions. But after contacting their tech support, they provided me with an updated version, which they had released recently, and that solved the problem. I now believe that with that support, what i paid for that driver was worth it.'cos I would've been kept waiting for the updates if i was using some free driver with poor tech support.
    see these links..
    http://forum.java.sun.com/thread.jsp?forum=48&thread=351239
    and another one
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=e4774458.0301270610.134f9e5d%40posting.google.com&rnum=1&prev=/groups%3Fq%3DaveConnect%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3De4774458.0301270610.134f9e5d%2540posting.google.com%26rnum%3D1
    I do think this is some problem that could be solved by the driver vendors. the M$ 's TDS version is still a mystery as far as i know. and the driver should communicate with sql server using this TDS protocol. I dont know, may be SP3 would've introduced updates in the TDS protocol.. and the drivers should be able to support it, or new updated versions released.
    It can happen in future too... M$ may change their stance anytime.. better be wise in choosing your DB Server and even be more careful while chosing JDBC drivers.
    cheers,
    -Jer

  • How can I export image column from SQL Server 2000

    Hi everybody,could someone tell me how can I export an entire column( pictures type) to a folder on disk?I've tried the textcopy.exe under the SQL installation's binn folder,it can only export one picture a time,I'm trying to find an automated way to export
    the whole colum's images to a folder,I'm using SQL Server 2000.

    Vishal,thanks for the replay,I've tried the BCP method but it seems does not work on my Sql Server 2000,also the SSIS package method is demonstrated with Sql Server 2008 R2 and my machine does not have the visual application to try it.In the BCP method,I
    got prompt  indicating me that I wrote something wrong in the grammer,and I'm pretty sure that maybe I made something wrong in the below part,the grammer makes me confused
    INSERT
    INTO @sqlStatements
    SELECT 'BCP "SELECT Photograph_Data FROM [ALBSCH_Trial].[dbo].[Photograph] WHERE Photograph_ID = '''
    + CAST(Photograph_ID AS VARCHAR(500)) + '''" queryout ' + @OutputFilePath
    + CAST(Photograph_ID AS VARCHAR(500)) + '.jpg -S localhost\SQLEXPRESS2008 -T -f C:\SQLTest\Images.fmt'
    FROM dbo.Photograph

  • Help me! can not using JDBC driver for MS SQL server

    I can test sucess in connection, but create EJB when have follow error.
    04/05/19 12:23:04 SQL error: No suitable driver
    04/05/19 12:23:10 Error creating table: No suitable driver
    500 Internal Server Error
    java.lang.NoClassDefFoundError: oracle/jbo/html/HtmlServices
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:182)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)

    HI All,
    I am using JDBC driver to pull data from MS SQL Server
    2000 for my application Liaison Content Exchange, and
    which only accepts JDBC drivers to talk to databases.
    I dowloaded the driver from Microsoft website, and had
    a successful installation.What do you call "a successful installation"? Where was the JAR file places?
    But the application ask me for Driver Name, Class, URL, Time out and Data Source.What application do you mean? Liaison Content Exchange? I'm not familiar with that product.
    By default no driver is available in the drop down combo box. After using
    "com.microsoft.jdbcx.sqlserver.SQLServerDataSource" as
    class and
    jdbc:microsoft:sqlserver://192.168.17.2:1433; as url,
    the application throw me a error which states "Unable
    to instantiate an instance of the application driver"Sounds like it could be one of several things:
    (1) The JDBC JAR is not in the CLASSPATH where Liaison Content Exchange expects to find it.
    (2) You need to do something else to tell Liaison Content Exchange more information to define the data source.
    (3) The URL might be incorrect. Only you can know if the IP address of the host is correct. You don't supply a database name - perhaps you should. Are you sure that 1433 is the correct port number? I know that's true for SQL Server 7.0, but I remember that the default was changed to something else for SQL Server 2000. Ask your database admin what port this listener is assigned to for SQL Server 2000.
    (4) You might want to append ";selectmethod=cursor" to the end of your URL. (See the docs for this.)
    (5) Make sure you can connect to the database with something other than Java (e.g., the M$ SQL Server client).
    . I am not able to trouble shoot this problem, any one
    pls help me ASAP at [email protected]
    Thx.Bad idea to post an e-mail address. You're not supposed to communicate outside the forum. it's against the guidelines for using the forum.

  • Can't see data in data tab - sql server 2005

    hello,
    i am connected to a sql server 2005 database (with jtds driver), the connection is ok, i see the tables but i can't see data in data tab.
    i have an error : incorrect syntax
    somebody can help me ?
    thank's in advance
    alex

    definitely. I was going to say, make sure you have the privileges to read data.
    From Microsoft SQL Server 2000 on, it is recommended that you are a member of the db_datareader - so that data in the database can be read
    Barry

  • Can not read Chinese data when DB Connect to SQL server 2000

    Hi,
       Our BW server( BW3.5 not unicode ) is installed on MS SQL server 2000. We try to connect the BW SQL server with db connect function. We create some test views in the Northwind DB. We are be able to access data from source system in rsa1 by db connect. The problem is that all the Chinese characters are displayed as ?????. Is there any special setting for accessing multibyte characters in MS SQL server 2000? Please advise.
    Thank you,
    Jeff

    The field of VIEW in the sqlserver which code is chinese must be the nvarchar.
    You can try it.

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • How can I get a date without the hour from sql server 2000 ?

    hellou!
    I have a JTable, and one of it's columns has to show a date. This date i have to show is specified as datetime on the Sql Server 2000 database where I have to take the data.
    the query of the dataset attached to the JTable is something like "select * from Table".
    The problem is that the JTable column that displays the date shows the date and the hour, for example:
    7/10/04 0:00:00
    and I need to show the date without the hour, only the 7/10/04. Can anyone tell me how to do that?
    thank you very much! : )

    The easiest way to format a date is with java.text.SimpleDateFormat. When creating it you pass a format string which can be used to parse or format date objects.
    SimpleDateFormat formater = new SimpleDateFormat( "MM/dd/yyyy" );
    // Get date objects directly from sql
    Date foundDate = result.getDate( 1 );  //where result is the ResultSet and 1 is the date column
    String formatedDate = formater.format( foundDate );Now the JTable's table model can be adjusted to store a formated String instead of a Date. If for some reason it is required to store the value as a Date overload the table model to return the formated string when getValueAt is called.

Maybe you are looking for

  • Down Payment Final invoice accounting document split

    Dear All, We are using Milestone Billing and after posting the down payment request, while creating the final billing the Sales order line item and the down payment settlement line items are appearing. After successful creation of the final invoice t

  • Only first plot of waveform chart has run-time menu

    Hello again all you helpful forum-goers! My multi-plot waveform chart is working decently well, but now for some reason only the first plot in the plot legend displays a run-time customization menu when I click on it while the VI is running (allowing

  • Transitioning to Java from Quicktime...

    Hi :) I am seriously thinking of transitioning all of my cross platform projects to Java from Quicktime wired media. an examples: http://www.siren.cc/siren/launch.html http://www.fonovisa.com/fonoplayer.html Will Java [Swing?] allow me keep custom sh

  • Error - gr.

    Dear All, I have created an PO in ME21N. I have done the Release Strategy for the PO. GR based IV  is ticked in the PO  in invoice tab and goods received tab in delivery tab. I have not maintained item category U in my PO. I am trying to do the GR bu

  • Is this trying to create a PK index twice?

    When Application Express writes out a .sql file, it has the following: CREATE TABLE "HTMLBITMAPS" (     "BMNAME" CHAR(32) NOT NULL ENABLE,      "BMDATA" BLOB NOT NULL ENABLE,      "BMFORMAT" NUMBER(3,0) NOT NULL ENABLE,      "REPORTID" NUMBER(38,0) N