Server Error in '/' Application.

Unclosed quotation mark after the character string '106565'.
Incorrect syntax near '106565'. (select OnlineOxunma from vw_Kitablar where id='106565)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Unclosed quotation mark after the character string '106565'.
Incorrect syntax near '106565'. (select OnlineOxunma from vw_Kitablar where id='106565)

Source Error:


Line 56:         catch (SqlException ex)
Line 57:         {
Line 58:             throw new Exception(ex.Message + " (" + sql + ")");
Line 59:         }
Line 60:         adapter.Dispose();

Source File: c:\inetpub\wwwroot\Kitabxana\App_Code\Baglanti.cs    Line: 58

Stack Trace:


[Exception: Unclosed quotation mark after the character string '106565'.
Incorrect syntax near '106565'. (select OnlineOxunma from vw_Kitablar where id='106565)]
   Baglanti.GetDataTable(String sql) in c:\inetpub\wwwroot\Kitabxana\App_Code\Baglanti.cs:58
   Baglanti.GetDataCell(String sql) in c:\inetpub\wwwroot\Kitabxana\App_Code\Baglanti.cs:91
   En_KitabEtraflien.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Kitabxana\En\KitabEtraflien.aspx.cs:31
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4063.0