Click here to Skip to main content
16,019,618 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to create a class file for containing all the tables and their fields of database(sql server/ms access) in VB.Net.
pls provide the code for above problem in vb.net.
Posted
Updated 18-Mar-11 0:51am
v3
Comments
Albin Abel 18-Mar-11 6:45am    
Not sure what you are asking for. A in memory copy of the database? May be you may need to have a look at repository patterns
Sandeep Mewara 18-Mar-11 6:46am    
pls provide the code for above problem in vb.net.
Anything less would not work for you? Why?

Your to vague!

do you want to get the column names from the results of a query? If so this will work for sql server

get column names from a sql server query[^]

if I got it wrong you need to expand your question
 
Share this answer
 
Why would you want this? Can you not just load the table in a DataTable object, or use Entity Framework for your SQL Server tables?

Right click your project and choose [ Add -> New Item ]

In the dialog box choose ADO.NET Entity Data Model and enter a name for the object (for example DatabaseNameEntities)

A blank screen appears, right click it and choose 'Generate model from Database'.

Good Luck,

Eduard
 
Share this answer
 
If you want to generate some sort of model of a database in VB.net you can use ADO.net DataSets, Linq To SQL or Entity Framework.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900