Re: Import to Access



Dear Alex,

thanks for your help, creating tables works just fine! If you can tell or show me a little more on creating the relationships and to defining the primary keys (declaring the key as protected did not help), it would be perfect!

greetings,
Chris

Alex Mandel wrote:
Got a little excited about being able to help so I fished up the example and posted it (The site may be down for a couple of hours today due to planned power outage). It should be available right away or if you wait 6 hours.

http://www.cdfg-rap.net/applications/development/documents/dia2accessExample..zip/download

the .dia file is the diagram
.SQL is the sql from dia2code output
tool.bas is a text file showing what the VBA code inside the database looks like (by hand for this example)
.mdb the final table

Sorry no relationships in this example but I can dig up the web pages on that later if you need.

Alex

Christian Thanner wrote:
Hi Alex,

thanks a lot for the information, I'll try that. Honestly, I've to say I did not expect it to be possible.

It would be great if you could also post your example, for sure it would be of great help!

Thanks again,
Chris

Alex Mandel wrote:
Christian Thanner wrote:
Hi there,

I would like to know if it at all possible to design a data model in dia and import it to MS Access or to Open Office Base, and if it is, maybe some hints how to do so.

greetings,
Chris
_______________________________________________

Yes, I've done it.

I can post an example tomorrow,but here's the general idea.
Make a UML diagram, each table is a class.
Each field in a table is an attribute of the class.

You have to code it for the end database you want, so if you want a text field for access you have to give the field as
Name: SomeName
Type: TEXT and add any constraints following it using what Access SQL wants.
Comments are ignored

Then run dia2code on the dia file to get and SQL file.

Copy and paste the SQL removing end of line and --attributes-- or write yourself a script to call DAO and run the SQL. (I've been hoping to get to this part soon, last part that isn't automated.)

Now you have an Access database.

Alex



_______________________________________________
Dia-list mailing list
Dia-list gnome org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]