Reply
how we can empty the table or database in ASP
Old 12-12-2005, 03:37 AM how we can empty the table or database in ASP
faisalzafar's Avatar
Experienced Talker

Posts: 41
Location: Pakistan
Hi dear,

I have one application in ASP with Access database and i want to empty the database, can i do that ??


Regards
Faisal Zafar
__________________
[COLOR=Pink]Faisal Zafar[/color]
faisalzafar is offline
Reply With Quote
View Public Profile Visit faisalzafar's homepage!
 
When You Register, These Ads Go Away!
Old 12-12-2005, 04:24 AM
chrishirst's Avatar
Super Moderator

Posts: 15,224
Location: Blackpool. UK
empty the entire db or empty the tables ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-12-2005, 09:08 AM
faisalzafar's Avatar
Experienced Talker

Posts: 41
Location: Pakistan
any one ? i want the tables and also empty the database , can u plz define both ways
Regrads
__________________
[COLOR=Pink]Faisal Zafar[/color]
faisalzafar is offline
Reply With Quote
View Public Profile Visit faisalzafar's homepage!
 
Old 12-12-2005, 11:07 AM
chrishirst's Avatar
Super Moderator

Posts: 15,224
Location: Blackpool. UK
you can't empty the database but keep the tables, emptying the database would remove all the tables

I'll assume you want to keep the tables and the db structures intact but just remove the records.

To remove all records from a table you use;

Code:
TRUNCATE TABLE table_name
this will also set any autonumbers back to the initial value

you can also use
Code:
DELETE FROM table_name
to empty the database use;

Code:
DROP TABLE table_name
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to how we can empty the table or database in ASP
 

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11813 seconds with 12 queries