none
database with microsoft Access in c# RRS feed

  • Question

  • hai, I'm beginner for C#..

     i would like to ask.. the format to read database from access into C# 

    can we read column? actually i can parameter Row from columns..

      textBox1.Text = ds.Tables[0].Columns[0].ItemArray[2].ToString();
                textBox2.Text = ds.Tables[0].Columns[0].ItemArray[3].ToString();
                textBox3.Text = ds.Tables[0].Columns[0].ItemArray[4].ToString();
                textBox4.Text = ds.Tables[0].Columns[0].ItemArray[5].ToString();

    Friday, April 25, 2014 4:15 PM

Answers

  • Hello,

    >> can we read column? actually i can parameter Row from columns..

    Do you mean that you want to read the data from access using way as:

    textBox1.Text = ds.Tables[0].Columns[0]…

    Unfortunate, the ADO.NET does not provide such a method. Being confused why you want to do it, if you are trying to get data from the access, you have already done using the below code:

    textBox1.Text = ds.Tables[0].Rows[0].ItemArray[2].ToString();

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 28, 2014 5:52 AM
    Moderator

All replies

  • sorry Rows" to" columns actually..
    Friday, April 25, 2014 4:17 PM
  • Hello,

    >> can we read column? actually i can parameter Row from columns..

    Do you mean that you want to read the data from access using way as:

    textBox1.Text = ds.Tables[0].Columns[0]…

    Unfortunate, the ADO.NET does not provide such a method. Being confused why you want to do it, if you are trying to get data from the access, you have already done using the below code:

    textBox1.Text = ds.Tables[0].Rows[0].ItemArray[2].ToString();

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 28, 2014 5:52 AM
    Moderator