[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

convert .ddl file to an access db file?

Posted on 2004-08-21
13
Medium Priority
?
914 Views
Last Modified: 2012-05-05
how to convert .ddl file to an access db file? what tool to use?
0
Comment
Question by:she1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
13 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 11858850
a file with the extension .DDL is a file which contains Data Definition Language (CREATE TABLE... etc).

The best you could do would be to EXECUTE that DDL, to create that tables, though this may not be completely possible, since Access amy or may not support the Data Types specified in the .ddl file.  The best you can do is to open the .ddl file with Notepad, and look at the commands that you find.

AW
0
 

Author Comment

by:she1
ID: 11858968
yes , i can open the file with notepad and see these command,
but is there a tool run these command to creat the table?
0
 
LVL 17

Expert Comment

by:BillAn1
ID: 11858985
You can simply paste them into a query (one at a time!) in Access
However, as Arthur Wood points out, they may not work in Access, if the data types are wrong, or if there is any sophisticated DDL, such as creating indexes, constraints etc. a lot of DDL is database-specific.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 11859552
can you paste the DDL from the file, so we can look at it, and then be better able to advise you as to what to do next?

AW
0
 

Author Comment

by:she1
ID: 11862502
DROP TABLE AutoStock;

CREATE TABLE AutoStock (make varchar(25), model varchar(25), year integer,
  color varchar(25), mileage integer, price float(10),
  vin integer PRIMARY KEY);

INSERT INTO AutoStock VALUES (
'Porsche', '911', 2001, 'Black', 25, 90000, 123456
);

INSERT INTO AutoStock VALUES (
'Ferrari', 'Maranello', 2001, 'Red', 15, 200000, 24601
);

INSERT INTO AutoStock VALUES (
'Lamborghini', 'Diablo', 2001, 'Yellow', 20, 275000, 80386
);

INSERT INTO AutoStock VALUES (
'Audi', 'TT', 2001, 'Gray', 25, 40000, 5000
);
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 11864036
this is clearly DDL for Microsoft SQL Server, and there are some siginificant differences between the datatype is Access and SQL Server (Access does not support varchar text fields, and Access Integers are not exactly that same type as SQL Server Integers - An SQL INTEGER field is more correctly an Access LONG INTEGER Access also does not support the SQL Server datatype 'float')

Also, this contains both DDL (CREATE TABLE ...) and DML (Data Management Language - INSERT INTO...) statements, and these would need to executed SEPARATELY in Access.  Access can only execute ONE SQL statement per file, not a block such as this.


There is no DIRECT way to convert the SQL Server DDL file to the equivalent Access cvommands - there is no single program that can do this, short of executing the DDL file into SQL Server (creating the table and importing the data), and then exporting the SQL Server table as a Access table (using SQL Server DTS - Data Transformation Service), or Linking Access to the SQL Server table, and importing the data into an equivalent Access Table.

AW
0
 

Author Comment

by:she1
ID: 11864075
thanks , is it possible to "importing the data into an equivalent Access Table." directly?
"
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 11865197
if you use SQL Server DTS, then you can export from SQL Server directly to a table in your Access database, if that is what you mean.


But that DDL is so simple, why don't you simply create the same table in Access (Table/New)???

AW
0
 

Author Comment

by:she1
ID: 11866513
but later on, I have a more complicated DB, and i want to convert it again, what can i do?
0
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 120 total points
ID: 11869718
your best approach would appear to the to execute the DDL in SQL Server, and then export the tables to Access.  As I said, there is no direct way to execute the SQL Server DDL in Access, as the datatypes are too differennt, and the SQL Server DDL incluudes MULTIPLE sets of commands, and Access can only execute one command per instruction set.

AW
0
 

Author Comment

by:she1
ID: 11876686
actually the database is cloudscape. my i just run the command in access?
or i have to run it at sql server?
0
 

Author Comment

by:she1
ID: 11960221
actually , it might be the cloudscape DB. i am not sure it is or not?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 11962440
I doubt that it is Cloudscape, as CloudScape appears to be an object-relational database management system (ORDBMS).  And I doubt that IBM would use the same command architecture as MicroSoft ( and the DataTYpes specified in the DDL are definitely SQL Server DataTypes).

AS I indicated on 8/23 - process the DDL in SQL Server, and then import the tables into Access, and you should be set to go.

AW
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question