System.Data.SqlClient.SqlException was unhandled by user cod
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