Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2004, 09:15 PM
Authorized User
 
Join Date: Jan 2004
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Deleting Tables in SQL using ASP and VB Script

Hello,

I am trying to find some type of script to delete a table that I created on a remote SQL server. I only have MS Access and I know it is possible to create an Access table, export it, and then link it back to the Remote SQL database. The info inside can be updated, but if I need to change the table, you cannot do that through access.

I figure if I can delete the table, and then export the reformatted table, this is essentially the same thing. I am not concerned with the information in the table (i.e. the records) the table ASP pages I am writing are still in development.

Thank you for you help,

-Darren


 
Old February 2nd, 2004, 07:38 AM
Authorized User
 
Join Date: Jun 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Im guessing you can use the SQL:
DROP TABLE <table_name>;

in an ADODB.Command

you can also use:
ALTER TABLE <table_name>
ADD <column_name> <column_type>

or to delete a cloumn:
ALTER TABLE <table_name>
DROP COLUMN <column_name>

I suggest purchasing a copy of teach yourself SQL in ten minutes. Its been a godsend for me. Or you could probably check the MYSQL documentation (i think chapter six details all the SQL commands you will ever need, but i find it quite hard to read)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tables migration from Access to SQL Server-VB.NET ayazhoda VB.NET 2002/2003 Basics 2 May 3rd, 2007 05:59 AM
Execute VB Script from ASP krishnakumars Classic ASP Professional 1 January 31st, 2007 08:38 AM
Updating/Deleting from SQL using ASP Tee88 Classic ASP Databases 4 May 6th, 2005 11:14 AM
asp vb script error rsjaladi Classic ASP Databases 2 November 26th, 2004 10:46 AM
creating tables using sql script -howto? qwjunk SQL Server 2000 0 August 24th, 2004 09:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.