how to get tables of an access db into a list box using c#?

Posted by fathatsme on Stack Overflow See other posts from Stack Overflow or by fathatsme
Published on 2009-08-07T05:35:54Z Indexed on 2010/06/09 13:02 UTC
Read the original article Hit count: 125

Filed under:

hi evry1!

i needed to create a form in which i hav to browse and open mdb files ---> i did this part usin oprnfile dialogue!

private void button1_Click(object sender, EventArgs e)

{

OpenFileDialog oDlg = new OpenFileDialog();

oDlg.Title = "Select MDB";

oDlg.Filter = "MDB (*.Mdb)|*.mdb";

oDlg.RestoreDirectory = true;

string dir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

oDlg.InitialDirectory = dir;

DialogResult result = oDlg.ShowDialog();

if (result == DialogResult.OK)

{

textBox1.Text = oDlg.FileName.ToString();

}

}

**this is my code so far!!!

now i need to make 3 list boxes!! 1st one to display the table names of the db! 2nd to to display field names when clicked on table name!!! 3rd to display attributes on fiels on clickin on it! v can edit the attribute values and on clickin of save button it should update the database!!!

pls help**

i'm new to C# so if u could pls help specifically on d doubt i asked it wud b really helpful to me

© Stack Overflow or respective owner

Related posts about c#