private void FrmClientMaster_Load(object sender, EventArgs e)
{
Global.GetServerDetails();
this.EnableDisableControls("LOAD");
LoadCombo();
}
private void LoadCombo()
{
clsSqlObj.CreateCon();
Global.GtSQLString = "select countryid,countryname from Country where CompanyId=" + Global.GiInstitutionId;
cmbCountry.DataSource = clsSqlObj.SqlDataTable(Global.GtSQLString);
cmbCountry.DisplayMember = "countryname";
cmbCountry.ValueMember = "countryid";
clsSqlObj.CloseConn();
}
public DataTable SqlDataTable(String SQLString)
{
SqlDataAdapter sqlda = new SqlDataAdapter(SQLString, sqlcon);
DataTable Dt = new DataTable();
sqlda.Fill(Dt);
return Dt;
}
the error is near sqlda.Fill(Dt);......thanx in advance
System.Data.SqlClient.SqlException was unhandled by user cod
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Amit ChoudharyRank #145 · 15.8K reputationPosted Dec 28, 2012, 6:14 AM EST