
December 5th, 2003, 01:24 PM
|
|
Registered User
|
|
Join Date: Oct 2003
Posts: 17
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Can't alter table
I am using the following code to (try to) insert a new column into an existing database but the response back from the response.writes are the two existing columns, no new one.
Code:
<!--#include virtual="/mmd/mmdnr/connx.asp" -->
<%
AlterCompanyTableSQL = "ALTER TABLE tblCompanies ADD COLUMN CommodityID VARCHAR(5);"
ConnString.Execute(AlterCompanyTableSQL)
Set rsData = Server.CreateObject("ADODB.Recordset")
DisplaySQL = "SELECT * FROM tblCompanies;"
rsData.Open DisplaySQL, ConnString
Response.write "<p>" & rsData.Fields.Count & "</p>"
for each fn in rsData.Fields
Response.write "<p>" & fn.name & "</p>"
next
Set rsData = nothing
ConnString.Close
%>
|