0

I want to concatenate Emp_ID and First_Name column but it gives multistep error. my other table works fine except for the EMPLOYEE table.

try
            {
                con.Open();
                ds = new DataSet();
                dt = new DataTable();
                ds.Tables.Add(dt);
                cmd = new OleDbCommand("SELECT Emp_ID + First_Name FROM EMPLOYEE", con);
                cmd.CommandType = CommandType.Text;
                dAdapt = new OleDbDataAdapter(cmd);
                cBuilder = new OleDbCommandBuilder(dAdapt);
                dAdapt.Fill(dt);
                bind = new BindingSource();
                bind.DataSource = dt;

                dataGridView1.DataSource = bind;
               // dataGridView1.Columns[0].HeaderText = "ID";

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Shizuo
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.