For each non-system table, the function calls function MakeCreateTableStatement. It skips any table whose name begins with MSYS because those are the system tables. It opens the database and loops through the tables in the TableDefs collection. The output for the example database looks like this:īefore starting, add a reference to "Microsoft DAO 3.6 Object Library" (or whatever your version is).įunction MakeAllCreateTableStatements makes a string containing all of the CREATE TABLE statements. It also doesn't explore relations, indexes, etc. I just haven't had time to test anywhere near all of the combinations possible. WARNING: This example is serious under-tested. This program uses DAO to list the tables in an Access database and generate CREATE TABLE statements to build them. This example shows how to generate CREATE TABLE statements for an Access database in Visual Basic 6. Generate CREATE TABLE statements for an Access database in Visual Basic 6 VB Helper: HowTo: Generate CREATE TABLE statements for an Access database in Visual Basic 6
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |