Hi there,
I am very new to .net and I am starting to learn things. Can somebody share me a working code that will put the schema/structure of a table into a combobox. Pls. consider the ff:

1. file is mdbdata.mdb
table is mdbtable
combo is combobox

2. file is dbfdata.dbf
table is dbfdata.dbf
combo is combobox

Thx in advance for the help.

Newvbguy

Recommended Answers

All 3 Replies

Can you please tell us what you want us to do?.. And if you do post the code and we will help you out.

I am unsure what you are looking for but in VB.net you have the ability to ad a Bind to a table in your Database to a Combo Box and then you can set a Display member and Value from that table. So for instance if you had a table called TblAnimals that contained a pk field called AniID (autonumber) and a char field that contained a Animal Description (AniDesc):

1 Dog
2 Cat
3 Lion
4 Shark

then you could bind that TblAnimals to the combobox and display AniDesc, and set the matching value to be AniID. so the combo boc would display, Dog, Cat, Lion, Shark as each item of the list and the Selected Value would be 1, 2, 3, 4

Hope this helps you in some way. 8-D

Thanks for your help and comments guys but I prefer to do it in code although using the binding method will work but it seems to me is not very flexible specially if you are using different kind ot table. I am still look for a code that will show all the table names in an access table.
Somebody tell me about schema but I can't find any clear sample.
Thanks again.

Newvbguy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.