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