Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URGENT: Cant remove column from table in SQL Enterprise Manager

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
I am deperately trying to remove fields I added via SQL Enterprise manager, it wont let me highlight the row and remove it.


Does anyone know how to do this?, I dont know why it's so hard to find in help, or MSDN online.

I added them to suppoort extra fields, but our webapplication is currently getting this error when trying to pull back the Recordset.


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Cursor open failed because the size of the keyset row exceeded maximum allowed row size.

/customreport7/savereport.asp, line 55


Line 55 is of course the command to the DLL
which of course this is the code line


sSQL = "Select * from ReportTable where ReportNumber = '" & sReportNumber & "'"


the table structure is currently

[tt]
ReportNumber varchar (50) NULL ,
ReportName varchar (255) NULL ,
ReportTitle varchar (255) NULL ,
ReportTitleCaption varchar (255) NULL ,
Footer1 varchar (50) NULL ,
Footer2 varchar (50) NULL ,
Footer3 varchar (50) NULL ,
Description varchar (255) NULL ,
FilterString varchar (255) NULL ,
RecordsPerPage varchar (50) NULL ,
ReportCompleted bit NOT NULL ,
Step varchar (50) NULL ,
AuthorName varchar (75) NULL ,
DateSaved datetime NULL ,
Date1 varchar (25) NULL ,
Date2 varchar (25) NULL ,
Date3 varchar (25) NULL ,
Date4 varchar (25) NULL ,
Date5 varchar (25) NULL ,
Date6 varchar (25) NULL ,
LeftHeader varchar (255) NULL ,
LeftFooter varchar (255) NULL ,
LeftHeaderDate varchar (255) NULL ,
LeftHeaderVal varchar (25) NULL ,
LeftFooterDate varchar (255) NULL ,
LeftFooterVal varchar (25) NULL ,
CenterHeader varchar (255) NULL ,
CenterHeaderDate varchar (255) NULL ,
CenterHeaderVal varchar (25) NULL ,
CenterFooter varchar (255) NULL ,
CenterFooterDate varchar (255) NULL ,
CenterFooterVal varchar (25) NULL ,
RightHeader varchar (255) NULL ,
RightHeaderDate varchar (255) NULL ,
RightHeaderVal varchar (25) NULL ,
RightFooter varchar (255) NULL ,
RightFooterDate varchar (255) NULL ,
RightFooterVal varchar (25) NULL
[/tt]


I also cannot seem to change the size , or the types either once they were added. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Karl, you should be able to open the table in EM, Design Table, right-click on a column and choose Delete Column.

If for some reason that doesn't work, you can crank up Query Analyzer and issue a command similar to:

[tt]alter table MyTable
drop column MyColumn [/tt] Robert Bradley
Coming Soon:
 
The issue is probably related to permissions and/or table/db ownership. Is it possible to connect as the sa user through query analyzer and use the ALTER TABLE command to drop the fields? If so, then it is definetly permission related.

Also, is this database being replicated? I doubt this is the problem, but, if the db is being replicated, that could pose additional complications.

If my recomendation helps, I could use your help. You were listed as somebody who is familiar with ASP development. I am trying to use a DataCombo in an ASP. I can use a list box, populate the recordset, etc., etc.. I cannot seem to get the datacombo ActiveX control to work. Do you have any experience working with this control in ASP's?

Any assistance would be greatly appreciated.
 
what I ended up doing (since I didnt know the drop method) was doing "Generate SQL Script" , that had the script to drop the table, and re-add it, cept this time, removing the columns I did not want, yes this did erase the data, but it did put the table structure, back, thanks for the syntax,

also SteveSB, yes I know ASP pretty well , been developing in it for over a year now , however with database connectivity , I am more oldfasion, I try to refrain from using Design time controls, like DataCombo. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
i don't know in sql but in oracle u can't remove field .
pramod
 
Lets just be glad for the moment I'm not using Oracle :) Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top