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. Web Development
  3. ASP.NET
  4. Apostropy Problem

Apostropy Problem

Scheduled Pinned Locked Moved ASP.NET
helpdatabasetutorial
3 Posts 3 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.
  • K Offline
    K Offline
    Khan Bangash
    wrote on last edited by
    #1

    Hi All, I m inserting values with the help of a Query in a table. There is a field named Company. I m using 'txtCompany' to insert the value to this field. Now the problem is that when Some One's Company Name like Jan's. Means the apstropy will give error. Any Suggession. Example INSERT INTO Delivery VALUES ('Company'). If company Name is "Shah's" then there will be error. Please Help Thanks in Advance.

    S S 2 Replies Last reply
    0
    • K Khan Bangash

      Hi All, I m inserting values with the help of a Query in a table. There is a field named Company. I m using 'txtCompany' to insert the value to this field. Now the problem is that when Some One's Company Name like Jan's. Means the apstropy will give error. Any Suggession. Example INSERT INTO Delivery VALUES ('Company'). If company Name is "Shah's" then there will be error. Please Help Thanks in Advance.

      S Offline
      S Offline
      Sebastian T Xavier
      wrote on last edited by
      #2

      in my openion there is only one way to solve this problem permanently. you have to use stored procedure to insert data ok happy coding sebastian aten india

      1 Reply Last reply
      0
      • K Khan Bangash

        Hi All, I m inserting values with the help of a Query in a table. There is a field named Company. I m using 'txtCompany' to insert the value to this field. Now the problem is that when Some One's Company Name like Jan's. Means the apstropy will give error. Any Suggession. Example INSERT INTO Delivery VALUES ('Company'). If company Name is "Shah's" then there will be error. Please Help Thanks in Advance.

        S Offline
        S Offline
        sunilkr
        wrote on last edited by
        #3

        which database you are using? if using sql: then when you write insert statment where you are passing vlues of that columns you must pass under [dfdf] if you are using oracle this is not possible from user side. you must use regular expression to avoid apostrophy.

        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