Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Developer looking for a new project Pin
Liam Cairns Kelly4-Aug-12 15:45
Liam Cairns Kelly4-Aug-12 15:45 
GeneralRe: C# Developer looking for a new project Pin
Wes Aday4-Aug-12 15:50
professionalWes Aday4-Aug-12 15:50 
GeneralRe: C# Developer looking for a new project Pin
Liam Cairns Kelly4-Aug-12 15:51
Liam Cairns Kelly4-Aug-12 15:51 
GeneralRe: C# Developer looking for a new project Pin
Wes Aday4-Aug-12 15:53
professionalWes Aday4-Aug-12 15:53 
GeneralRe: C# Developer looking for a new project Pin
Mycroft Holmes4-Aug-12 17:47
professionalMycroft Holmes4-Aug-12 17:47 
GeneralRe: C# Developer looking for a new project Pin
Liam Cairns Kelly5-Aug-12 5:13
Liam Cairns Kelly5-Aug-12 5:13 
GeneralRe: C# Developer looking for a new project Pin
jschell5-Aug-12 7:56
jschell5-Aug-12 7:56 
QuestionC# 2010 change linq to sql Pin
dcof4-Aug-12 11:03
dcof4-Aug-12 11:03 
In a C# 2010 application that uses linq to sql datacontext object that connects to a sql server 2008 r2 database, I need to do a maintenance change to modify the size of a notes field from varchar(500) to varchar(900).

I am getting the error message, "changing the data type of column 'field2' on table 'test1' from 'varchar(500)' to 'varchar (900)' causes the following indexes to exceed the maximum index size of 900 bytes: index2 when change the column size using sql server management studio 2008 r2.

I am assuming that the datacontext object added this notes field to the index? If I am correct or not, can you tell me why a data field of this size would be used as a foreign key by the data context object.

I am trying to determine what my options are to fix this problem. The following is what I noted so far:

1. I saw the table I am referring to is a clustered index and I do not want to change the index for this reason. Note there are several foreign keys in the table I am referring to, however the primary key to this table is an 'int'. The only option I can see is to increase the size of the field to varchar(886) instead of varchar(900).

2. Could I change the field to a text size? This way the field can be the size the user may need. Can you tell me if this is a good option or not any why?

3. Is there a way I could change the data context object so this field is not a foreign key to another table? If so, how would I accomplish this goal?

4. Are there any other options I would have?
Questiondispose (always?) Pin
thewazz4-Aug-12 7:46
professionalthewazz4-Aug-12 7:46 
GeneralRe: dispose (always?) Pin
PIEBALDconsult4-Aug-12 8:25
mvePIEBALDconsult4-Aug-12 8:25 
GeneralRe: dispose (always?) Pin
OriginalGriff5-Aug-12 22:18
mveOriginalGriff5-Aug-12 22:18 
AnswerRe: dispose (always?) Pin
Ed Hill _5_5-Aug-12 22:12
Ed Hill _5_5-Aug-12 22:12 
AnswerRe: dispose (always?) Pin
OriginalGriff5-Aug-12 22:18
mveOriginalGriff5-Aug-12 22:18 
AnswerRe: dispose (always?) Pin
BobJanova5-Aug-12 23:49
BobJanova5-Aug-12 23:49 
GeneralRe: dispose (always?) Pin
PIEBALDconsult6-Aug-12 3:50
mvePIEBALDconsult6-Aug-12 3:50 
GeneralRe: dispose (always?) Pin
BobJanova7-Aug-12 0:26
BobJanova7-Aug-12 0:26 
GeneralRe: dispose (always?) Pin
PIEBALDconsult7-Aug-12 3:36
mvePIEBALDconsult7-Aug-12 3:36 
GeneralRe: dispose (always?) Pin
thewazz7-Aug-12 4:58
professionalthewazz7-Aug-12 4:58 
GeneralRe: dispose (always?) Pin
Pete O'Hanlon7-Aug-12 23:43
mvePete O'Hanlon7-Aug-12 23:43 
GeneralRe: dispose (always?) Pin
jschell10-Aug-12 12:42
jschell10-Aug-12 12:42 
GeneralRe: dispose (always?) Pin
PIEBALDconsult10-Aug-12 13:38
mvePIEBALDconsult10-Aug-12 13:38 
GeneralRe: dispose (always?) Pin
jschell11-Aug-12 7:28
jschell11-Aug-12 7:28 
GeneralRe: dispose (always?) Pin
PIEBALDconsult11-Aug-12 12:05
mvePIEBALDconsult11-Aug-12 12:05 
QuestionC# setup and deployment projects Pin
Zeyad Jalil4-Aug-12 3:26
professionalZeyad Jalil4-Aug-12 3:26 
AnswerRe: C# setup and deployment projects Pin
jschell4-Aug-12 7:00
jschell4-Aug-12 7:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.