Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. need solution for storing '(single quotation) in sql database

need solution for storing '(single quotation) in sql database

Scheduled Pinned Locked Moved Database
databasehelp
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tech_spidy
    wrote on last edited by
    #1

    I developed an project in vb for storing some quotations in sql db and displaying it on ASP web page on daily basis. when i am adding quotes in the database, whenever i am using single quotation mark i am getting some run time error .. i need a solution to solve this problem. Give me an instant solution to rectify this problem regards,:doh:

    Tech_spidy

    N C K 3 Replies Last reply
    0
    • T Tech_spidy

      I developed an project in vb for storing some quotations in sql db and displaying it on ASP web page on daily basis. when i am adding quotes in the database, whenever i am using single quotation mark i am getting some run time error .. i need a solution to solve this problem. Give me an instant solution to rectify this problem regards,:doh:

      Tech_spidy

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Hi Replace single quotation with double quotation before sending to database. it will be like this comment's will be comment''s

      Cheers Navaneeth!!

      T 1 Reply Last reply
      0
      • N N a v a n e e t h

        Hi Replace single quotation with double quotation before sending to database. it will be like this comment's will be comment''s

        Cheers Navaneeth!!

        T Offline
        T Offline
        Tech_spidy
        wrote on last edited by
        #3

        hi Navaneeth, thanks for ur immediate response.. see while displaying some motivational quotes like, it wouldn't look good.. In official sites we can't go display like this. thanks for ur temprory solution. if you/anyone know the exact solution please reply.. regards,:(

        Tech_spidy

        W N 2 Replies Last reply
        0
        • T Tech_spidy

          hi Navaneeth, thanks for ur immediate response.. see while displaying some motivational quotes like, it wouldn't look good.. In official sites we can't go display like this. thanks for ur temprory solution. if you/anyone know the exact solution please reply.. regards,:(

          Tech_spidy

          W Offline
          W Offline
          WoutL
          wrote on last edited by
          #4

          Hi, I think Navaneeth mend to say: Replace the single quotation by two single quotations.

          Wout Louwers

          1 Reply Last reply
          0
          • T Tech_spidy

            hi Navaneeth, thanks for ur immediate response.. see while displaying some motivational quotes like, it wouldn't look good.. In official sites we can't go display like this. thanks for ur temprory solution. if you/anyone know the exact solution please reply.. regards,:(

            Tech_spidy

            N Offline
            N Offline
            N a v a n e e t h
            wrote on last edited by
            #5

            Hi Tech_Spidy Don't worry. In database only single quote will be stored. It won't store '' in table.

            Cheers Navaneeth!!

            T 1 Reply Last reply
            0
            • T Tech_spidy

              I developed an project in vb for storing some quotations in sql db and displaying it on ASP web page on daily basis. when i am adding quotes in the database, whenever i am using single quotation mark i am getting some run time error .. i need a solution to solve this problem. Give me an instant solution to rectify this problem regards,:doh:

              Tech_spidy

              C Offline
              C Offline
              Colin Angus Mackay
              wrote on last edited by
              #6

              Use parameters to insert strings in to the database. That way you don't have to escape quotation marks. And you improve the security of your application.


              Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

              T 1 Reply Last reply
              0
              • C Colin Angus Mackay

                Use parameters to insert strings in to the database. That way you don't have to escape quotation marks. And you improve the security of your application.


                Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos

                T Offline
                T Offline
                Tech_spidy
                wrote on last edited by
                #7

                ok.. i will try tht. thanks for ur response. regards:)

                Tech_spidy

                1 Reply Last reply
                0
                • T Tech_spidy

                  I developed an project in vb for storing some quotations in sql db and displaying it on ASP web page on daily basis. when i am adding quotes in the database, whenever i am using single quotation mark i am getting some run time error .. i need a solution to solve this problem. Give me an instant solution to rectify this problem regards,:doh:

                  Tech_spidy

                  K Offline
                  K Offline
                  Krish KP
                  wrote on last edited by
                  #8

                  In SQL 2000 there is some thing called SET QUOTEDIDENTIFIER ON/OFF Pls check this. would help you.

                  T 1 Reply Last reply
                  0
                  • N N a v a n e e t h

                    Hi Tech_Spidy Don't worry. In database only single quote will be stored. It won't store '' in table.

                    Cheers Navaneeth!!

                    T Offline
                    T Offline
                    Tech_spidy
                    wrote on last edited by
                    #9

                    Thank you so much navaneeth.. wht u suggested is exactly working.. regards:)

                    Tech_spidy

                    1 Reply Last reply
                    0
                    • K Krish KP

                      In SQL 2000 there is some thing called SET QUOTEDIDENTIFIER ON/OFF Pls check this. would help you.

                      T Offline
                      T Offline
                      Tech_spidy
                      wrote on last edited by
                      #10

                      thanks for ur response krish. but i m using sql server for this wat navaneeth suggested is working exactly . regards:)

                      Tech_spidy

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups