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 6894955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:50:50+00:00 2026-05-27T06:50:50+00:00

I am running microsoft sql 2008 and jdbc driver 3.0 and am getting this

  • 0

I am running microsoft sql 2008 and jdbc driver 3.0 and am getting this error on a batch SQL update

“New request is not allowed to start because it should come with valid transaction descriptor”

To debug I’ve reduced the batch size down to just one statement, but it still errors. Here it is

IF EXISTS (SELECT * FROM StaffDetail WHERE PsnID = 'GC91') 
    UPDATE staffdetail 
    SET    psnid = 'GC91', 
           servicegroup = '41B001', 
           discipline = 'IT', 
           dob = '1967-09-28', 
           ghdstartdate = '2008-12-15', 
           yearsexperience = '11 to 20 years', 
           classification = 'Admin Officer 1' 
    WHERE  psnid = 'GC91' 
ELSE 
    INSERT INTO staffdetail 
                (psnid, 
                 servicegroup, 
                 discipline, 
                 dob, 
                 ghdstartdate, 
                 yearsexperience, 
                 classification) 
    VALUES      ('GC91', 
                 '41B001', 
                 'IT', 
                 '1967-09-28', 
                 '2008-12-15', 
                 '11 to 20 years', 
                 'Admin Officer 1') 

Why does it error? I’ve googled this and only found references to a bug in SQL 2005 not 2008.

Is there any way I can change the connection string I use to connect or change the SQL statements I use in the batch to try and avoid this error?

  • 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-27T06:50:51+00:00Added an answer on May 27, 2026 at 6:50 am

    You can MERGE instead which removes the IF and ELSE which makes it really one statement

    MERGE INTO staffdetail AS TARGET 
    USING (VALUES ('GC91', 
          '41B001', 
          'IT', 
          '1967-09-28', 
          '2008-12-15', 
          '11 to 20 years', 
          'Admin Officer 1')) AS SOURCE (psnid, servicegroup, discipline, dob, 
          ghdstartdate, yearsexperience, classification) 
    ON TARGET.psnid = SOURCE.psnid 
    WHEN MATCHED THEN 
      UPDATE SET servicegroup = SOURCE.servicegroup, 
                 discipline = SOURCE.discipline, 
                 dob = SOURCE.dob, 
                 ghdstartdate = SOURCE.ghdstartdate, 
                 yearsexperience = SOURCE.yearsexperience, 
                 classification = SOURCE.classification 
    WHEN NOT MATCHED BY TARGET THEN 
      INSERT (psnid, 
              servicegroup, 
              discipline, 
              dob, 
              ghdstartdate, 
              yearsexperience, 
              classification) 
      VALUES ('GC91', 
              '41B001', 
              'IT', 
              '1967-09-28', 
              '2008-12-15', 
              '11 to 20 years', 
              'Admin Officer 1') 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm running into a strange problem in Microsoft SQL Server 2008. I have a
System is Windows Server 2008 R2 Enterprise 64 bit Running Microsoft SQL Server 2008
I'm running an upgrade script against a database hosted in Microsoft SQL Server. It's
I get the following error when running FXCop: CA1800 : Microsoft.Performance : 'obj', a
Running FxCop on my code, I get this warning: Microsoft.Maintainability : 'FooBar.ctor is coupled
I'm following this walkthrough: http://msdn.microsoft.com/en-us/library/879kf95c(VS.80).aspx In a machine running vista ultimate, I have installed:
I have a website using Microsoft SQL 2008 server over local network. Sometimes, SQL
I have a few SSRS reports running on SQL Server 2008 Web Edition SP1
Using Entity Framework 4 with stored procedures and SQL Server 2008 SP1... When running
I am trying to connect the Sql Server 2008 R2 with java using JDBC.I

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.