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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:09:55+00:00 2026-06-10T07:09:55+00:00

I have an ASP.NET application with C# behind. The application gets data from WebServices

  • 0

I have an ASP.NET application with C# behind. The application gets data from WebServices and then it should execute the below update.

sqlQueryString2 = "
UPDATE CI
SET
 platform =@platform ,
 wstart = @wstart,
 wend = @wend,
 model = @model,
 productDescription = @productDescription,
 scanflag = @scanflag     
WHERE  serial = @serial ";

I realized that my application seems to be looping when certain values are returned from the Web service. The UPDATE is sent, doesn’t commit, and then it is picked up again on the next loop as needing to be updated.

I did a trace in SQL(Server 2005) and this is what is hitting the server:

exec sp_executesql N'
UPDATE CI 
SET 
 platform =@platform ,
 wstart = @wstart,
 wend = @wend,
 model = @model,
 productDescription = @productDescription,
 scanflag = @scanflag 
WHERE
 serial = @serial ',N'
 @serial nvarchar(11),
 @platform nvarchar(23),
 @wstart varchar(10),
 @wend nvarchar(10),
 @model nvarchar(24),
 @productDescription nvarchar(35),
 @scanflag nvarchar(1)',
 @serial=N'H01170RAHS6',
 @platform=N'Client Computer - Apple',
 @wstart=N'05/09/2011',
 @wend=N'05/09/2012',
 @model=N'iMac (20-inch, Mid 2009)',
 @productDescription=N'IMAC 20"/2.26/2X1GB/160GB/SD/MSE/KB',
 @scanflag=N'Y'

I suspect that the single doublequote in the productDescription might be throwing it, but I have had a bugger of a time trying to strip it out or replace it with (in.).
I think part of my issue on that front is the value stored when it is populated by the WebServices server is escaped as I can see it as “IMAC 20\”/2.26/2X1GB/160GB/SD/MSE/KB” in the watch list.
I have tried replacing the escaped and non escaped quote with String.Replace as well as a RegEx statement.
TBH I’m not even sure I’m on the right track with the quote. I’m only looking at it because not all returns contain one and they don’t all loop.

  • 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-06-10T07:09:56+00:00Added an answer on June 10, 2026 at 7:09 am

    The double quotes should not be a problem: inside of a string, they are just another character. (They have meaning outside of string constants but that is not what’s going on here.)

    I strongly suspect your problem is not a SQL syntax error. If it were, you’d see it show up in multiple places.

    For example, you would see them in SQL Profiler (if you included Errors and Exceptions in your trace). You could also run that exact SQL query you just pasted into SSMS and see that it does/does not work. More to the point, you would be getting a SQL exception on the C# side if the query returns an error. If none of those things are happening, then your query would appear to be working.

    More likely, the query is running, but not doing anything, so you are picking up the same records over and over as needing updating. Again, running in SSMS will give you the “1 row(s) updated” message that should help you track this problem down.

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

Sidebar

Related Questions

I have an asp.net application with a c# code-behind, connected to an SQL db
I have an asp.net application with c# code-behind. This application is a dispatch system
I have an ASP.NET web application and data in a SQLServer DB. What is
I have an ASP.NET website and a seperate C# application. The application writes data
Suppose I have an ASP.NET application running across several web servers behind a load
I have asp.net application. and I have created mobile version of it which is
I have asp.net application and am using Entity Framework to connect it with the
I have an asp.net application and I need to have two sessions running at
I have an Asp.net application hosted on a shared server. I have few cache
We have a ASP.NET application running and i have added a WCF Rest service

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.