Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Copy a database without the data.


Message #1 by "DON LOWE" <donlowe@s...> on Tue, 9 Oct 2001 08:33:15 +0200
I would like to know how one can copy the structure of a database that 

has data in it. I want to test a database and then once it is 

functioning properly create a clean database with no data in it and all 

the Autonumbers starting at 0.



Regards

Don



Message #2 by Walt Morgan <wmorgan@s...> on Tue, 09 Oct 2001 08:03:40 -0500
Don,



To me, the easiest way is to copy the mdb to another named mdb and then open

the other named mdb and open each table and delete its records, once this is

done, only the table structures are present along with queries and other

items like indexes, etc. This will result in a "data empty" mdb. I would

also then compact it to minimize its size.



Walt





Message #3 by "Pardee, Roy E" <roy.e.pardee@l...> on Tue, 09 Oct 2001 07:04:36 -0700
Open Access.

Choose Blank Access Database.

File -> Get External Data -> Import.

Select the db whose structure you want to copy.

Click 'Select All' on the Tables tab.

Click the options button to expand the lower part of the dialog.

Select 'Definition Only' option under Import Tables.



HTH,



-Roy



Roy Pardee

Programmer/Analyst

SWFPAC Lockheed Martin IT

(xxx) xxx-xxxx



-----Original Message-----

From: DON LOWE [mailto:donlowe@s...]

Sent: Monday, October 08, 2001 11:33 PM

To: Access

Subject: [access] Copy a database without the data.





I would like to know how one can copy the structure of a database that 

has data in it. I want to test a database and then once it is 

functioning properly create a clean database with no data in it and all 

the Autonumbers starting at 0.



Regards

Don










Message #4 by Walt Morgan <wmorgan@s...> on Tue, 09 Oct 2001 09:51:10 -0500
Roy,



Quite elegant. I consider that I've gone to school today. Since I only use

the mdb from within VB I was unaware of this procedure.



I appreciate your participation in this forum.



Walt





Message #5 by John Fejsa <John.Fejsa@h...> on Wed, 10 Oct 2001 08:19:05 +1000
Hi Don,



Why don't you just delete all test data and compact the database.  All 

autonumbers will reset to zero when you compact empty tables.  Then you 

can just use the same database.  Alternatively, if you need to keep the 

test data for a specific reason, just copy the entire database under a 

backup name before deleting and compacting the database.



_____________________________________



John Fejsa

Systems Analyst/Computer Programmer

Hunter Centre for Health Advancement



>>> donlowe@s... 09/10/2001 16:33:15 >>>

I would like to know how one can copy the structure of a database that =3D

has data in it. I want to test a database and then once it is =3D

functioning properly create a clean database with no data in it and all 

=3D

the Autonumbers starting at 0.



Regards

Don



Message #6 by "DON LOWE" <donlowe@s...> on Tue, 9 Oct 2001 17:56:40 +0200
Thank you all for the info on this. It will save me many hours and 

hopefully I will end up with a reasonable db.

Regards

Don





Message #7 by "DON LOWE" <donlowe@s...> on Wed, 10 Oct 2001 09:30:23 +0200
John

I need a bit more direction on your advice. I have deleted data on a 

table. Set the database to compact when it closes ( through the Tools- 

Options menu). When I re-open the database, the Auto numbers on the 

table are still there. If you have time could you set out the procedure 

for compacting the database that will re-set the autonumber to zero.

Thanks Don





Message #8 by "Brinley" <BrinleyG@b...> on Tue, 9 Oct 2001 20:15:48 +0800
Copy the database complete 

Remove the links 

Delete the data (hope not to many)

Compress the database

Replace the links



Or try splitting the database 

 

----- Original Message ----- 

From: DON LOWE <donlowe@s...>

To: Access <access@p...>

Sent: Tuesday, October 09, 2001 14:33

Subject: [access] Copy a database without the data.





> I would like to know how one can copy the structure of a database that 

> has data in it. I want to test a database and then once it is 

> functioning properly create a clean database with no data in it and all 

> the Autonumbers starting at 0.

> 

> Regards

> Don
Message #9 by John Fejsa <John.Fejsa@h...> on Thu, 11 Oct 2001 08:29:08 +1000
Hi  Don,



1) What do you mean "the Auto numbers on the table are still there"? Do 

autonumbers start from number 1 or the last number you had before 

compacting the database?  Autonumbers should start from 1 after you delete 

all data and compact the database.



2) Is you data in the same database as your forms, queries, modules, and 

reports or do you have a front-end/back-end system.  You have to copact 

the database containing your actual data.  If you have a front-end/back-end

 system make sure to compact your back-end, that is, database that stores 

your data not only the one that links to your data and stores your forms, 

reports, queries, modules, etc.



_____________________________________



John Fejsa

Systems Analyst/Computer Programmer

Hunter Centre for Health Advancement

Locked Bag 10

WALLSEND NSW 2287

Phone: (02) 49246 336 Fax: (02) 49246 209

>>> donlowe@s... 10/10/2001 17:30:23 >>>

John

I need a bit more direction on your advice. I have deleted data on a 

table. Set the database to compact when it closes ( through the Tools- 

Options menu). When I re-open the database, the Auto numbers on the table 

are still there. If you have time could you set out the procedure for 

compacting the database that will re-set the autonumber to zero.

Thanks Don





Message #10 by "Preethi" <preethi@s...> on Thu, 11 Oct 2001 08:56:15 +0600
Compact your database (The one with data).

Create a new database

Go to Import table (File -> Get External Data -> Import) and select your

database

a new dialog box will appear. Click Select ALL in all tabs (Tables, queries,

forms  etc.)

Check on options buton.

under import tables select definition only

now press OK



----- Original Message -----

From: "Brinley" <BrinleyG@b...>

To: "Access" <access@p...>

Sent: Tuesday, October 09, 2001 06:15 PM

Subject: [access] Re: Copy a database without the data.





> Copy the database complete

> Remove the links

> Delete the data (hope not to many)

> Compress the database

> Replace the links

>

> Or try splitting the database

>

> ----- Original Message -----

> From: DON LOWE <donlowe@s...>

> To: Access <access@p...>

> Sent: Tuesday, October 09, 2001 14:33

> Subject: [access] Copy a database without the data.

>

>

> > I would like to know how one can copy the structure of a database that 

> > has data in it. I want to test a database and then once it is 

> > functioning properly create a clean database with no data in it and all



> > the Autonumbers starting at 0.

> >

> > Regards

> > Don

>


  Return to Index