Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    16

    Exclamation Unanswered: set nocount on???

    Hi, i have the next problem...
    I work with:
    - Sqlserver 2000
    - Web server, Tomcat.
    - JDBC.
    - Java Aplication.

    I notice that when I call a store procedure from the aplication java, I usually set no count on in my sp because of some exception errors in my aplication.
    But I have one special version of a jdbc that it doesnt work with this parameter. I wish it could be a parameter of the database that is set by the jdbc, but iīm not sure.

    Any idea?????

    Thanks.

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    Quote Originally Posted by efl00002
    I usually set no count on in my sp because of some exception errors in my aplication.
    What do you mean by 'some exception errors'?

  3. #3
    Join Date
    Oct 2003
    Posts
    16

    set nocount on???

    First of all, thanks and sorry for my poor english.
    I mean that when I call a store procedure from the java aplication and the store procedure have to process a high number of rows (for example in a cursor), the servlet returns to me with a Exception. Not too many time ago, somebody said that it could work if i a insert set nocount on in the sp. That worked but no with this sp. In this sp it seems like the another case because if a call the sp for one reg it works but not for many regs.
    In this case i have an java.lang.OutOfMemoryError.

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    ok, so I think there should be a way of figuring out how many data (rows, bytes of data) the stored procedure returns. No matter how much it is, the java application is not able to deal with it. If you're able to find out how much data is returned and what exactly is going between calling the sp and getting/processing the results, you can figure out why the OutOfMemoryError happes at all and fix that instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •