Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6726443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:55:41+00:00 2026-05-26T09:55:41+00:00

I am connecting to SQL Server via Spring in WebSphere. I have a piece

  • 0

I am connecting to SQL Server via Spring in WebSphere. I have a piece of pretty simple dynamic SQL (below) that is throwing “The cursor was not declared.”

SELECT TOP 1
    short_desc shortDescription
FROM
    product.prs.PRODUCT_SKN (nolock)
WHERE
    prod_sales_div_code = 'XXX'
    AND product_nbr = ?

One of the settings for the data source that seems relevant is the “select mode” is “cursor”. I’m not really sure what I need to do to resolve the error.

edit The calling code is:
findShortDescriptionQuery.get().findObjectByNamedParam(of("productNumber", productId))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:55:42+00:00Added an answer on May 26, 2026 at 9:55 am

    I removed the “nolock” directive altogether, along with the “TOP 1”, and the problem went away. This makes me suspect it is related to the JDBC driver.

    This workaround is less than ideal, but will work just fine for my purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some Crystal Reports connecting to a Sql Server db that I would
When connecting to sql server, I have the hardcoded string (local). Is this a
The excel spreadsheet is connecting to SQL server 2005 using the connection string below:
Currently we have a hybrid ASP/PHP setup connecting to a SQL Server 2005 database.
We have a SQL Server 2005 database, and currently all our users are connecting
i want to practice connecting from asp.net to a sql server database. i have
I have a SQL Server 2008 stored procedure that updates values in a table.
I have a SQL Server that holds a lot of data. An application, running
I am connecting to a Microsoft sql server database via java jdbc and having
I have a process that runs on a SQL server that is set to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.