This program will read a SQL Server database or MS Access database and write Classes and Collections for each table you select. It is a complete application with all source code included. I have commented some of the code but most is self documented.
Inputs
Database Type, ServerName, DatabaseName, User Login, Password
Assumes
What you can learn from this program.
1. How to use ADO - Connections, Recordsets, Update, Insert, Delete
2. How to use the ADOX Reference to get various information from a database
(i.e. TableNames, TableTypes, FieldNames, FieldTypes, etc...)
3. Classes
4. Collections
5. Writing to a sequential file.
Returns
Classes and Collections
Side Effects
If you have extremely large tables you may have to do some editting to the generated code as it uses line concatenation. If there are too many continued lines, VB won't load the module.
API DeclarationsReadPrivateProfileString
WritePrivateProfileString