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. Error Saving data into database

Error Saving data into database

Scheduled Pinned Locked Moved ASP.NET
databasehelp
2 Posts 2 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.
  • S Offline
    S Offline
    suriee
    wrote on last edited by
    #1

    Hai, when i am saving data through stored procedure the following error is coming i am not able to find where i have to change, Description is below, Thanks and Regards, surendra System.Data.SqlClient.SqlException: Unclosed quotation mark before the character string ','2','1')'. Line 1: Incorrect syntax near ','2','1')'. at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at NS.clinicalhistorygrid.NS_CLINICALHIST_MST_sp(String PARAMMYOPTION, DateTime PARAMCLINICHIST_DATE, String PARAMCLINICHIST_TIME, String PARAMSPECIALTY, Int32 PARAMCLINICHIST_ID, String PARAMPAT_REG_NO, String PARAMSTATUS, Int32 PARAMRELATION_PATIENT_ID, String PARAMGIVEN_BY, String PARAMCONSULTANT, String PARAMPRESENT_HISTORY, String PARAMTAKEN_BY, Int32 PARAMRETVAL) in C:\Inetpub\wwwroot\NS\clinicalhistory.aspx.vb:line 1681

    surendra

    K 1 Reply Last reply
    0
    • S suriee

      Hai, when i am saving data through stored procedure the following error is coming i am not able to find where i have to change, Description is below, Thanks and Regards, surendra System.Data.SqlClient.SqlException: Unclosed quotation mark before the character string ','2','1')'. Line 1: Incorrect syntax near ','2','1')'. at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at NS.clinicalhistorygrid.NS_CLINICALHIST_MST_sp(String PARAMMYOPTION, DateTime PARAMCLINICHIST_DATE, String PARAMCLINICHIST_TIME, String PARAMSPECIALTY, Int32 PARAMCLINICHIST_ID, String PARAMPAT_REG_NO, String PARAMSTATUS, Int32 PARAMRELATION_PATIENT_ID, String PARAMGIVEN_BY, String PARAMCONSULTANT, String PARAMPRESENT_HISTORY, String PARAMTAKEN_BY, Int32 PARAMRETVAL) in C:\Inetpub\wwwroot\NS\clinicalhistory.aspx.vb:line 1681

      surendra

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      This error means that you have ' somewhere in the middle of a column you are trying to save. Like if you are saving the person's name and their name is "o'neil" that would blow up. So you might need to check your strings for ' and either remove them or replace them with a " or something like that. Hope that helps. Ben

      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