A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Truncate In Access



 
 
Thread Tools Display Modes
  #1  
Old October 22nd, 2008, 04:04 PM posted to microsoft.public.access.tablesdbdesign
dz2k7 via AccessMonster.com
external usenet poster
 
Posts: 1
Default Truncate In Access

Is there any way in Access to drop the table and free up the space at the
same time like TRUNCATE does.

DELETE * FROM my_table; dosen't free up space.

DROP TABLE my_table; doesn't do that too.

The problem is that my tables are big and I hit 2GB limit all the time.
I don't want to compact and repare DB everytime I delete a table because I
can't automate this from inside the DB. I don't want to manage this DB from
outside writing VBS scripts or something.

Any ideas?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200810/1

  #2  
Old October 22nd, 2008, 06:40 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Truncate In Access

Backup database and then do a 'Compact and Repair.'
--
KARL DEWEY
Build a little - Test a little


"dz2k7 via AccessMonster.com" wrote:

Is there any way in Access to drop the table and free up the space at the
same time like TRUNCATE does.

DELETE * FROM my_table; dosen't free up space.

DROP TABLE my_table; doesn't do that too.

The problem is that my tables are big and I hit 2GB limit all the time.
I don't want to compact and repare DB everytime I delete a table because I
can't automate this from inside the DB. I don't want to manage this DB from
outside writing VBS scripts or something.

Any ideas?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200810/1


  #3  
Old October 22nd, 2008, 10:03 PM posted to microsoft.public.access.tablesdbdesign
Klatuu[_3_]
external usenet poster
 
Posts: 396
Default Truncate In Access

It is unusual to hit the 2G limit. Is there any chance you have any
graphical images or pictures embedded in the database? That is usually the
cause of a mdb hitting the 2G limit.

If this is the case, a better solution is to store all the images in a
folder and use either a text or hyperlink field in a table to point to the
external graphics.

But, if this is not the case and you actually have that much data, it is
time to consider upsizing to SQL Server.


"dz2k7 via AccessMonster.com" u47070@uwe wrote in message
news:8c0d19ff4608a@uwe...
Is there any way in Access to drop the table and free up the space at the
same time like TRUNCATE does.

DELETE * FROM my_table; dosen't free up space.

DROP TABLE my_table; doesn't do that too.

The problem is that my tables are big and I hit 2GB limit all the time.
I don't want to compact and repare DB everytime I delete a table because I
can't automate this from inside the DB. I don't want to manage this DB
from
outside writing VBS scripts or something.

Any ideas?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/200810/1



  #4  
Old October 22nd, 2008, 11:59 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Truncate In Access

On Wed, 22 Oct 2008 15:04:06 GMT, "dz2k7 via AccessMonster.com" u47070@uwe
wrote:

Is there any way in Access to drop the table and free up the space at the
same time like TRUNCATE does.

DELETE * FROM my_table; dosen't free up space.

DROP TABLE my_table; doesn't do that too.

The problem is that my tables are big and I hit 2GB limit all the time.
I don't want to compact and repare DB everytime I delete a table because I
can't automate this from inside the DB. I don't want to manage this DB from
outside writing VBS scripts or something.

Any ideas?


In addition to Karl's and Klatuu's concerns... why are you routinely creating
(or filling) and dropping (or emptying) tables AT ALL? "Scratch" tables are
only rarely necessary. If this is one of the rare cases where you do have a
demonstrable need for a scratch table (i.e. a Select query is too slow or
cannot be run for some other reason), then consider creating and deleting a
"scratch" .mdb file. See

http://www.granite.ab.ca/access/temptables.htm

for an example.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.