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  dBforums > Data Access, Manipulation & Batch Languages > ASP > Dropping Tables in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-06, 14:40
bailee220 bailee220 is offline
Registered User
 
Join Date: Oct 2003
Posts: 29
Dropping Tables in ASP

I all ready have a connection open to a database. I know I have write access to it, because I've ran a Select INTO query and it populated the table. What I'm needing to do it delete the table. I know the command is DROP TABLE <table_name> but that doesn't work. It throws me out of my program. Any help would be appreciated.

Thanks,
Bailee
Reply With Quote
  #2 (permalink)  
Old 07-10-06, 17:11
csamuels csamuels is offline
Registered User
 
Join Date: Mar 2006
Location: south jersey, usa
Posts: 53
http://www.1keydata.com/sql/sqltruncate.html

Quote:
Sometimes we wish to get rid of all the data in a table. One way of doing this is with DROP TABLE, which we saw in the last section. But what if we wish to simply get rid of the data but not the table itself? For this, we can use the TRUNCATE TABLE command. The syntax for TRUNCATE TABLE is

TRUNCATE TABLE "table_name"

So, if we wanted to truncate the table called customer that we created in SQL CREATE, we simply type,

TRUNCATE TABLE customer
__________________
"They say Moses split the Red Sea
I split the blunt and rolled the fat one, I'm deadly"
-- Tupac 'Blasphemy'
Reply With Quote
  #3 (permalink)  
Old 08-03-06, 13:45
Reghardt Reghardt is offline
Registered User
 
Join Date: Aug 2006
Location: San Francisco, CA
Posts: 136
You might not have DROP access. Just because you can SELECT, UPDATE, INSERT, and DELETE from a table doesn't mean you can DROP the table.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On