Here's how to do it in access:<br><br>ALTER TABLE MyTable ADD COLUMN LastName TEXT;<br><br>Here's how to do it with SQL Server:<br><br>ALTER TABLE MyTable ADD COLUMN LastName VARCHAR(30);
it looks something is still wrong in "alter table" statement.<br><br>my two files:<br>-------------<br>addcolumn1:<br><form action="addcolumn2.cfm" method="post">NEW COLUMN: <input type="text" name="newcolumn"><br><br><input type="submit" value="add it now"></form><br>-------------<br>addcolumn2:<br><cfquery datasource="mytable" name="addcolumn"><br><b>ALTER TABLE tablename="Mytable" ADD COLUMN #newcolumn# VARCHAR(30)</b><br></cfquery><br><cfif #newcolumn#><br><cfoutput query="addcolumn"><br><html><head><title>add column</title></head><body>new column #newcolumn# has been added</body></html><br></cfoutput><br><cfelse><br><cfoutput>can't figure out what you typed in.</cfoutput><br></cfif><br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.