Hi All,
Can someone point out where I am wrong? I tried all sorts of debug, replaced with array to populate in my drop down and all works fine, except my below code.
SELECT_ACCOUNT_OWNER = Select statement
Could someone tell me why the above code not working? Where am I wrong.
Thank you!
Can someone point out where I am wrong? I tried all sorts of debug, replaced with array to populate in my drop down and all works fine, except my below code.
Code:
DataTable dt = new DataTable();
dt = dataMyClient.GetAccountOwnerList(usrname);
DropDownList.DataSource = dt;
DropDownList.DataTextField = "name";
DropDownList.DataValueField = "EmployeeID";
DropDownList.DataBind();
Code:
public DataTable GetAccountOwnerList(string username)
{
DataTable dt = new DataTable();
try
{
m_Adapter = new SqlDataAdapter(SQLStatement.SELECT_ACCOUNT_OWNER.Replace("@username", username), m_Connection);
m_Adapter.Fill(dt);
}
catch (Exception ex)
{
}
return dt;
}
SELECT_ACCOUNT_OWNER = Select statement
Could someone tell me why the above code not working? Where am I wrong.
Thank you!