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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:48:14+00:00 2026-06-10T03:48:14+00:00

If I want to insert a statement which contains quotation mark, how is it

  • 0

If I want to insert a statement which contains quotation mark, how is it possible ?

For Example I have a text box and I enter:

Future Swami Vivekananda’s grand father's name was "____" .
  • 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-10T03:48:16+00:00Added an answer on June 10, 2026 at 3:48 am

    If you use properly parameterized statements, you shouldn’t need to worry about it. Something like this (though please don’t learn C# techniques from me):

    string sql = @"UPDATE dbo.table SET col = @p1 WHERE ...;";
    string myString = @"hello'foo""bar";
    
    SqlCommand cmd = new SqlCommand(sql, conn);
    cmd.CommandType = CommandType.Text;
    cmd.Parameters.Add("@p1", SqlDbType.VarChar, 30).Value = myString;
    

    (Though you really should be using stored procedures.)

    If you are building your strings manually (which you really, really, really shouldn’t be doing), you need to escape string delimiters by doubling them up:

    INSERT dbo.tbl(col) VALUES('hello''foo"bar');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this on http://old.nabble.com/insert-statement-td21157498.html I want to do the same thing .I have
I want to add a row using SQLs INSERT statement. Is it possible that
I execute an INSERT INTO statement cursor.execute(INSERT INTO mytable(height) VALUES(%s),(height)) and I want to
I want to insert given text to existing pdf at X,Y location provided. I
I have a MySQL database which contains a table of users. The primary key
Basically, I have a table called document which contains a column named as host.
I want to have a unique constraint on a column which I am going
While executing an INSERT statement with many rows, I want to skip duplicate entries
Good Morning, I have 2 views: ICCUDays which contains one record per account with
I have a simple insert select which insert _TABLE_B_ data in _TABLE_A_ new row

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.