I am trying to populate a label using a T-Sql query to a SQL Server table upon a click event. I have the click event and linking to the SQL Server table working just fine. The process (below) returns "System.Windows.Forms.BindingSource" rather than any value from the table. My code is as follows.
string strCon = "Data Source=ITxxx;Initial Catalog=FDM;Integrated Security=True";
// Mailed date
string strSQLi = "select " +
"Mailed_Dt " +
"from [FDM].dbo.XREF_ProductTbl" +
" where Product = " + " '" + cboxMailRespSelProgram.Text.ToString() + "'";
SqlDataAdapter dataAdapterI = new SqlDataAdapter(strSQLi, strCon);
SqlCommandBuilder commandBuilderI = new SqlCommandBuilder(dataAdapterI);
DataTable tblProductI = new DataTable();
BindingSource productIBindSource = new BindingSource();
productIBindSource.DataSource = tblProductI;
dataAdapterI.Fill(tblProductI);
lblProductI.Text = "Mailed Date: " + productIBindSource;
Your help will be greatly appreciated!