.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Cannot modify a column type in a table in SQL Serv 2008 Ent

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :Sql Server
I used ot be able to do it when the same tables were part of Sql Express: to change the column type in SSMS but now I get an error. I have never seen it before. I created a large number of table in one DB and for some reason I cannot recall, some of them ended up with int type for volume column, others bigInt. They all appear to have been created from .NET C# code not manually. Now I am getting exceptions because my code expects Int64 across the board.

This is the message that pops up when I try to save the change:

Saving Changes is not permitted. The changes you have made require the following tables to be dropped and recreated. You have either made changes toi a table that can't be recreated or enabled the option prevents saving changes that require the table to be re-created.

Apparently some option is set up wrongly in the Properties=>Options. the question is which one? I checked all Alter options and still cannot save the change.


View Complete Post

More Related Resource Links

Analysis Services 2008 e Excel pivot table: different filters for each column


I have to create a report in excel 2010 based on a  analysis services 2008 cube.

I created a pivot table that contains four columns containing the elements of a hierarchy. My problem is that each column should be filtered with different values of the same field.

For example: given a hierarchy that describes me a set of products, I have to filter the product for customer  1 and 3, Product B for  customer 2 and the product C for the customer 3.

I think this thing is not possible in Excel (right?)

So I decided to use a mdx script to filter each product 

I tried so (for example, product A):
scope (descendants([Products].[products].[liv0].&[A], 1, leaves));
[Measures].Quantity = sum({[Customer].[Code].&[01], [Customer].[Code].&[03]}, [Measures].quantity);
end scope;

I still get an error of infinite recursion. How can I solve my problem? Is there a better system than what I am following?

SQL 2008 table ORDER BY (individual specific value in column)?


Hi I have SQL 2008 table like,
AccountCode       AccountDesc       Value            Date                         ......       ....          ......
ACC1                  Receipts Total     50.88       2010-12-25
ACC1                  Delivery Total      140.12     2010-12-25
ACC1                  Post Amt            798.88      2010-12-25
ACC1                  Check Amt          31.70       2010-12-25
ACC1                  Cross Amt          90.82        2010-12-25 
ACC2                  Receipts Total     50.88       2010-12-25
ACC2                  Delivery Total      140.12     2010-12-25

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

Under the Table: Programming with FileStreams in SQL Server 2008


There's always been disagreement about whether large blobs, such as document and multimedia items, should be stored in the database or file system. In SQL Server 2008 you don't have to choose; filestream storage provides the best of both approaches.

Bob Beauchemin

MSDN Magazine May 2009

Under The Table: Spatial Data Support In SQL Server 2008


New spatial data support in SQL Server 2008 opens the door to mapping and querying geometric and geographic data, allowing you to build exciting new applications.

Bob Beauchemin

MSDN Magazine February 2009

Basic Instincts: Type inference in Visual Basic 2008


Visual Basic 2008 provides type inference to get the language ready to take advantage of LINQ and make your code more robust.

Bill Horst

MSDN Magazine October 2007

DataGrid: Tailor Your DataGrid Apps Using Table Style and Custom Column Style Objects


One of the most enduring challenges in writing user interfaces is figuring out how to display large amounts of data efficiently and intuitively without bewildering the user. The problem becomes particularly thorny when the interface must reflect hierarchical relationships within the data that the user needs to modify. The Windows Forms DataGrid control gives developers a powerful and flexible tool to meet this challenge. This article explains its basic operations and shows how to extend the DataGrid to display columns of data in an application-appropriate manner.

Kristy Saunders

MSDN Magazine August 2003

To create a custom control and type while creating a column


HI All,

i am creating a column in the list while creating a column i will have an option for choice field on selecting choice i can see dropdown, radiobutton, Checkbox to select and  can enter list of values. and on clicking ok i will get a column with radiobutton. in newform.aspx and also in editform.aspx

so i need to create the similar functionality with my custom radio button, so on create column i need to show my custom choce on selecting this i need to show my custom radiobutton  and  can enter list of values then on selecting it then click ok to create a column, in edit form and new form i need to show a radio buttons with values.

Thanks in advance




How do I modify the link of a Hyperlink column ?


OK , I'm a bit new to this game. I'm trying to build a web page that simply scans a directory in the server and creates a web page with links to the files in that directory - sounds simple and should be easy to do !

So I have a bit of code that reads the myDocuments folder in my web site and then populates a grid view hyperlink column with the filenames in the folder - wow it works !

The only thing I am struggling with now is getting the hyperlink correct within the GridView so that the user goes to the actual document.

So my code behind is;

Dim dirInfo As New System.IO.DirectoryInfo(Server.MapPath("~/MyDocuments"))  
       articleList.DataSource = dirInfo.GetFiles()  

which reads the file info in the directory myDocuments and binds the info to a datasource.

So now I'm using that datasource to display the filenames in a gridview so that the user can click on a name and open the file.

SSRS 2008 Graph Type?


Greetings -


I am required to plot the following graph in an SSRS report.


Sum of Total Credits to be shown on Positive side and total sum of Debits for a month on negative side. I have created a query which retrieves all the expenses for the month and sums them up before feeding the same to the graph for plotting. Both values returned are positive integers.


(Sorry for the diagram below, i tried to paste an image but it didn't work)

want to autoincrement a character type in table

For Example, "E0001" Everytime  it will automatically incremened by 1. "E0001" -> "E0002-> "E0003" and so on. "E0010" -> "E0011" and so on. "E0100" -> "E0101" and so on.  

Dual values in Column chart Y axis in SSRS 2008

Hi,  Any one pls tell me how to show dual values in Column chart Y axis. Example: Im showing Total Number of clients in the Y axis of column chart My Requirement is In that Y axis column chart also  i want to show differently of Inactive clients from total number of clients. how to do this pls help me. Thanks in advance. TotalnumberOf clients :  1000 InActive Clients : 200 among TotalnumberofClients      

Line Divider i n Column chart in SSRS 2008

Hi,  Any one pls tel me how to do the single line divider in Column chart in SSRS 2008 example: --------- |               | |     20      | ---------- |       100 | |               | -------------------------------   i want to show the above example. Thanks in advance Regards, Abdul2010

Creating a table-valued function on a user defined type in SQL Server CLR

We would like to be able to create a table-valued function on a user defined type.  We would like the syntax in SQL to look like it works for the XML nodes function:   DECLARE @myXml XML = '<a><b>1</b><b>2</b><b>3</b></a>' ; SELECT  node.query('text()') FROM    @myXml.nodes('a/b') nodes (node) ;   In other words, in the FROM clause, we can access the "nodes" method of the xml variable and it returns a rowset. Thanks!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend