Adam
Adam

Reputation: 77

Add Columns to Access database with ASP

I have an website written in ASP classic with VB. I need to add a column to the table, but I cannot take down the website to be able to edit the table in access. How do I do this in code?

I am very new to ASP and access, I have a lot of experience in PHP and MYSQL but I have been able to find the syntax.

Thanks for all assistance.

Upvotes: 0

Views: 2319

Answers (2)

Adam
Adam

Reputation: 77

OpenDB("database/cpio.mdb") SQL = "ALTER TABLE Members ADD business_url text"

dbRS1.Open SQL, dbConn, adOpenDynamic, adLockOptimistic

Upvotes: 2

d_ethier
d_ethier

Reputation: 3911

Should be relatively easy if you are already connecting to the database and executing queries. Try:

ALTER TABLE <table> ADD COLUMN <column> <type> NULL/NOT NULL

Upvotes: 0

Related Questions