wanted to show the single column single cell

Feb 1 2010 6:14 AM
Hi Guys,
by this below code I am able to fetch the whole table,
Suppose I wanted to show the single column  single Row then what will be the change in this code.
I don't want to change the select querry from that code also ,

I wanted to display the   ( Row[0].Cell[0].Values only ...........)
 

CODE IS AS FALLOWS :- \



string conString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Environment.CurrentDirectory + @"\dbAccount.accdb;Persist Security Info=False;";

            OleDbConnection conn = new OleDbConnection(conString);
            OleDbCommand command = new OleDbCommand();
            command = conn.CreateCommand();

            DataSet ds = new DataSet();

            command.CommandText = "SELECT * FROM Bill";
            OleDbDataAdapter adapter = new OleDbDataAdapter();
            adapter = new OleDbDataAdapter(command);
            adapter.Fill(ds);

            conn.Close();
                            
            dataGridView1.DataSource = ds.Tables[0];
  

Answers (1)