Hello, I rec'd help here earlier and need help with another MS-SQL Server 2k script (OSS experience only). I'm trying to add a column to an existing table using the SQL ALTER statement. Problem is, (1) the ALTER statement is not executing (or executing successfully), and (2) I have no VB skills to code it so that I get back a meaningful error message. Here's my code:
Thanks in advance!
Code:
<%
on error resume next
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=sqloledb;Data Source=<server>;Initial Catalog=<dbname>;User Id=<dbuser>;Password=<dbpass>;"
Set RS = Conn.Execute("ALTER TABLE product_tmp ADD COLUMN prod_file_for_download varchar(100) NULL")
... ? Error check / Confirmation using Response.Write ? ...
RS.Close
Conn.Close
Set RS = Nothing
Set Conn = Nothing
%>
Thanks in advance!