mpnut
MIS
- Aug 27, 2003
- 242
I am very new to .asp so any help would be greatly appreciated. I have a .asp page that I am trying to use "ALTER TABLE" to add a column. However, it doesn't seem to want to work for some reason. Here is the .asp:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionTimeout=60
conn.Open "DSN=AspTest;uid=aspuser;pwd=aspuser"
sql="ALTER TABLE Recall ADD R10101 bit"
'on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("Did not process")
else
Response.Write("<h3>" & recaffected & " record updated. Please Wait...</h3>")
end if
%>
Here is the message I get when I debug:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]User does not have permission to perform this operation on table 'Recall'.
/Test/Recall/NewRecPage.asp, line 17
I don't think it's a permissions issue, because I can run update,insert and other things no problem. Also, I know the syntax is right because I can run "ALTER TABLE Recall ADD R10101 bit" from Query Analyser and it works fine, just not through the ODBC connection.
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.ConnectionTimeout=60
conn.Open "DSN=AspTest;uid=aspuser;pwd=aspuser"
sql="ALTER TABLE Recall ADD R10101 bit"
'on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("Did not process")
else
Response.Write("<h3>" & recaffected & " record updated. Please Wait...</h3>")
end if
%>
Here is the message I get when I debug:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]User does not have permission to perform this operation on table 'Recall'.
/Test/Recall/NewRecPage.asp, line 17
I don't think it's a permissions issue, because I can run update,insert and other things no problem. Also, I know the syntax is right because I can run "ALTER TABLE Recall ADD R10101 bit" from Query Analyser and it works fine, just not through the ODBC connection.