Server Error in '/' Application.

Error converting data type varchar to bigint.

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.Data.SqlClient.SqlException: Error converting data type varchar to bigint.

Source Error:


Line 58: 
Line 59:             DataTable dtKW = new DataTable();
Line 60:             dtKW = objIYCUtility.GetDataTable("Select Distinct A.Keyword from PhotoKeyWords A, PhotoGallaryInformation B, UploadedFileInformation C where A.KeyWordId = b.KeywordId and B.FileId = C.FileId and C.FileId = '" + keyword + "'");
Line 61: 
Line 62:             if (dtKW.Rows.Count > 0)

Source File: e:\Web Corp\schooldata\DPSDwarkaPG\DPSDwarkaDotNet\ProgramFiles\PhotoGalleryV2\GalleryInnerPage.aspx.cs    Line: 60

Stack Trace:


[SqlException (0x80131904): Error converting data type varchar to bigint.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +212
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2843
   System.Data.SqlClient.SqlDataReader.HasMoreRows() +266
   System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +278
   System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +198
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +295
   System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +721
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +268
   System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +579
   System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +181
   IYCFreameWork.IYCDataUtility.GetDataTable(String strquery) +138
   ProgramFiles_PhotoGalleryV2_GalleryInnerPage.BindPhoto() in e:\Web Corp\schooldata\DPSDwarkaPG\DPSDwarkaDotNet\ProgramFiles\PhotoGalleryV2\GalleryInnerPage.aspx.cs:60
   ProgramFiles_PhotoGalleryV2_GalleryInnerPage.Page_Load(Object sender, EventArgs e) in e:\Web Corp\schooldata\DPSDwarkaPG\DPSDwarkaDotNet\ProgramFiles\PhotoGalleryV2\GalleryInnerPage.aspx.cs:31
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975