I am trying to add some features to existing web app, a newbie here thank you for your help. I am kinda lost here and went through library solution could not find the solution.
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: AssistToolv2.SqlException: SqlException occurred during query execution:
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: SqlException occurred during query execution: ]
AssistToolv2.SQLEngine.Query(String query) in C:\Users\Tokin\Desktop\AssistToolv2\AssistToolv2\Classes\SQLEngine.cs:156
AssistToolv2.AssistRoundRobin.EE.Page_Load(Object sender, EventArgs e) in C:\Users\Tokin\Desktop\AssistToolv2\AssistToolv2\AssistRoundRobin\EE.aspx.cs:29
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
Code
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace AssistToolv2.AssistRoundRobin
{
public partial class EE : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataTable SMEs = new DataTable();
if (UserUtils.AccessLevel(Context.User.Identity.Name) < 5)
SMEs = SQLEngine.Query(string.Format("SELECT * FROM arr_SMEs WHERE ID={0}", UserUtils.AccessGroup(Context.User.Identity.Name))).Copy();
else
SMEs = SQLEngine.Query("SELECT * FROM arr_SMEs").Copy();
foreach (DataRow SME in SMEs.Rows)
{
Label SMEName = new Label();
SMEName.Font.Bold = true;
SMEName.Text = SME["Name"].ToString();
SMEPlaceHolder.Controls.Add(SMEName);
DataTable SMEEs = SQLEngine.Query("SELECT * FROM arr_SMEs WHERE ID=DataRow.SMEs");
DataTable DisplayData = new DataTable();
DisplayData.Columns.Add("Name");
DisplayData.Columns.Add("Skills");
DisplayData.Columns.Add("Count");
foreach (DataRow SMEE in SMEEs.Rows)
{
DataRow DisplayInfo = DisplayData.NewRow();
DisplayInfo["Name"] = SMEE["Name"];
DisplayInfo["Skills"] = string.Empty;
string[] eeskills = SMEE["Skills"].ToString().Split(';');
int count = 0;
foreach (string skill in eeskills)
{
if (count > 0)
DisplayInfo["Skills"] += ",";
DataTable skillName = SQLEngine.Query(string.Format("SELECT Name from arr_Skills WHERE SME={0}", SMEE["ID"].ToString())).Copy();
DisplayInfo["Skills"] += skillName.Rows[0] ["Name"].ToString();
count++;
}
}
GridView SMEHistory = new GridView();
SMEHistory.Width = Unit.Percentage(185.00);
SMEHistory.DataSource = DisplayData;
SMEHistory.DataBind();
SMEPlaceHolder.Controls.Add(SMEHistory);
LiteralControl linebreak = new LiteralControl("<br /><br />");
SMEPlaceHolder.Controls.Add(linebreak);
}
}
protected void DetailsView_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
{
bool test_var = true;
}
}
}'