Make Northwind

[Previous] [Next]

This project uses ActiveX Data Objects Extensions for Data Definition Language and Security (ADOX) to create a database with tables and queries that are nearly identical to the sample Northwind database that ships with various versions of Visual Basic, Access, and other Microsoft products. You might find this sample helpful if you want to learn more about creating Access databases with ADOX, or if you simply want to create a database similar to the Northwind sample.

The modCreateStructure module creates the new database file as well as the tables and QueryDef objects. (Keep in mind that QueryDefs created with the Jet 4.0 OLE DB Provider are not visible through the Access 2000 user interface.) If you're having problems creating tables or queries with ADOX, take a look at this portion of the code.

This sample's folder includes a subdirectory named Data. The files in this subdirectory correspond to the contents of the tables in the Northwind database. After the sample uses the modCreateStructure module to create the new database's structure, it uses the modInsertData module to populate the new database's tables based on the contents of these files. I've left the contents of the Northwind database's BLOB (binary large object) fields out of these data files to save some space and simplify the code in the sample.

Although the sample does not utilize the modLogData module, I've included it with the project so you could see the code I used to generate the files in the Data subdirectory.



Programming ADO
Programming MicrosoftВ® ADO.NET 2.0 Core Reference
ISBN: B002ECEFQM
EAN: N/A
Year: 2000
Pages: 131
Authors: David Sceppa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net