Use powerdesigner to generate an Access database

Source: Internet
Author: User
Tags mdb database microsoft access database powerdesigner

Powerdesigner generates an Access database

Since using PD, you have always known that access is supported, but you have never figured out how to create access data tables through scripts. The answer found in PD's tools is found in the C: \ Program Files \ Sybase \ powerdesigner 12 \ tools directory. Currently, only Access97 and Access2000 databases are supported. Access2007 databases are not supported yet, but it does not matter. You only need to generate an Access2000 Database Upgrade, but the trouble is to get an Access2000 environment. Of course, you can use access20007 directly, but you only need to use the 97 version. After opening it, You can enable and use the macro. Otherwise, it cannot be used.

The creation principle is to writeProgramTo analyze and execute the script generated by PD, and finally create a data table in the data file.

Note that if you use acccess. MDB in the tools directory to generate a database in PDM, you must change it to Access97. If access2k. mdb is used for generation, you need to change the database to acccess2000.

If "Type mismatch" occurs during the generation process, it may be because some default values are incorrect, or the field settings are too long, such as varchar (500). The maximum access value is 255.

The tools.txt file can be understood. The original article is as follows:

This file contains informations about contents of. \ tools subdirectory under powerdesigner installation directory.

MS access reverse (access. MDB and access2k. mdb)
========================================================== ========

Data exchange between powerdesigner and Microsoft Access (97 and 2000) works. DAT files. these files are created from PDM files via script generation, and reversed into the PDM. the access. MDB (Microsoft Access 97) and access2k. MDB (Microsoft Access2000) Databases use or create these files to generate or reverse access databases.

Opening the appropriate database opens a window in which you configure the database generation or reverse engineering.

Ex.

examples:
to reverse engineer Microsoft Access 97 Database "C: \ temp \ mydb. mdb "in a powerdesigner physical data model:
1. double-click \ tools \ access. MDB
2. select "reverse engineer Access database to powerdesigner script"
3. type "C: \ temp \ mydb. mdb "in select database (or click the search button)
4. type. DAT file to create in powerdesigner file
5. click on create
6. select DBMS-> reverse engineering databases in the powerdesigner PDM window
7. select the newly generated file as script file to be reversed
8. click OK

To generate a Microsoft Access 97 database from a powerdesigner PDM:
1. Generate script file from powerdesigner PDM (the usual procedure)
2. Double-click the file <powerdesigner_directory> \ tools \ Access. MDB
3. Select "generate access database from powerdesigner script file"
4. type the destination database in select database (or click the search button)
5. type the File Created by powerdesigner in powerdesigner File
6. Click on create

Note for V6 users: You can not use the old genacc. Bas file with powerdesigner.

I don't know which of the following guys translate on the Internet. I made the following adjustments:

To generate an Access database from an existing PDM (physical database model) file, you must first create an empty access data file blank. mdb, and then generate access database scripts, such as cre_database. SQL or cre_database.dat (generally SQL)

Generate a Microsoft Access database
Powerdesigner and MS (Microsoft) Access Database. DAT files exchange information. These files are created from the PDM (Physical Model) file through script generation. mdb database usage. create a database using the DAT file or reverse the ACCESS database operation. DAT file.

The following describes how to generate a MS Access database from the PDM file of powerdesigner:
1. Generate a database script file in powerdesigner
2. Double-click access in the tools directory under the powerdesigner installation directory. MDB (this is Access97. If it is Access2000, select file access2k. MDB) file (to open this file, you need to install access, please check whether your access has been successfully installed)
3. After opening successfully, a single region will be selected, select the first item "create access database from powerdesigner script file"
4. Select an empty access data file and a script generated by Pd in the following two boxes. In the select database box, enter the target database or Click Browse to select the target database (that is, the previously created blank. MDB File)
5. Enter a script file created by powerdesigner in the "powerdesigner file" or Click Browse to select a script file (if this file is not found, select all files in the file type)
6. Click "CREATE.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.