readonly

EF 4.0 model caching the data, and does not detect the modified data.

Dear All, I am developing ASP.NET application and I have problem with the EF 4.0 model. The EF model detects the newly added and deleted data, but not the modified data from the database. Here is an example of the problem what I have. A- Database: Script to generate the "Employees" database table CREATE TABLE [dbo].[Employees] ( ...

How to make a DataGridView column no-entry in VS2010/C#

Hi, I have a DataGridView which allows me to enter name/value pairs. The names are pre-defined, so the user just needs to enter a value. I have made the name (the first) column read-only so it can't be changed - that's great, but it can still be selected, and indeed, is by default when the form is displayed. Is it possible to make this...

Why my centos ext3 filesystem go read-only?

My centos ext3 filesystem go read-only random(only the /var partition). When i reboot it, i will changed back to rw. os: centos 5.4 partition: /var, size:80G the /var is for web logs and mysql data file. ...

variable that can't be modified

Does C# allow a variable that can't be modified? It's like a `const`, but instead of having to assign it a value at declaration, the variable does not have any default value, but can only be assigned a value once at runtime (EDIT: and possibly not from constructor). or is this not possible?...

How can I create my web pages Read Only for peoples?

I have a website http://www.bccfalna.com/ and the contents on this site are in HINDI Language. I want to make all these pages read only for peoples so that they can not copy the content. Since I have written some books in HINDI Language on Computer Technology and I know that there are very few Information in HINDI language on the Inter...

CF - Config file on device gets read-only attribute.

I have added a config file (myapp.exe.config) that is deployed to the device after installation. But the problem is that this file gets read-only attribute. I have tried adding some stuff in the setup project in "codeINSTALL_EXIT" function. On emulator it works ... it removes the read only attribute, while when installing on the phone th...

How do I set a readonly field in an initialize method that gets called from the constructor?

Hi I'm sure I've seen somewhere that I can do the following by using an attribute above my Init() method, that tells the compiler that the Init() method must only be called from the constructor, thus allowing the readonly field to be set. I forgot what the attribute is called though, and I can't seem to find it on google. public class ...

setting persistence context to read-only in jpa

we are going to be working with an old database. so it is very crucial that we do not modify the database/table/schemas under any circumstances (from the reporting modules), and as such i want to setup a persistence-context with some persistence units as read-only (for reporting modules), and some as normal JTA enabled. we have already ...

Read-only LINQ to SQL

I'm using LINQ to SQL to access my database but I'm only reading, I never insert, update or delete anything. Are there ways to optimize LINQ2SQL for this? ...

How do I recursively set read-only permission using Perl?

I would like $dir and everything underneath it to be read only. How can I set this using Perl? ...

Remove a file's "read only" attribute in vim after editing it and saving with :w!

I want to change the read only attribute from a file when I save it with :w! in vim. How do I do it? (I don't mind if I have to call an external script). I'm using Linux. I know I can use an external script using this command: autocmd BufWrite /tmp/* !sh /tmp/script.sh. So, I would like to call a chmod command when :w! is invoked: the ...

IE readonly textarea problem

I'm seeing an issue in IE7 and IE8 (but not other browsers) with a textarea when I dynamically change its "readonly" attribute. The textarea is initially defined as being read-only, and when the user clicks inside the textbox I set readOnly to false. At this point, if I type any normal characters, they don't get displayed - in fact, th...

What determines if a downloaded file should be saved as read-only or read-write?

When you write some binary data in the http response stream (of Servlet etc) or using the Content-disposition header, what is the factor that determines whether the downloaded file is saved as readonly or has write permissions ? How can we control whether to make it read-only or not? Is that browser/OS dependant? ...

Which NoSQL database for what purpose [large ro data]

Is there comparation which NoSQL is designed for what purpose? I'm especially interested in querying large amount of data practically read-only. Edit: I mean comparation between NoSQL databases not about comparation with SQL databases. ...

Why there isn't a ReadOnlyList<T> class in the System.Collections library of C#?

Reading about the problem of creating a read only primitive vector in C# (basically, you cannot do that), public readonly int[] Vector = new int[]{ 1, 2, 3, 4, 5 }; // You can still changes values I learnt about ReadOnlyListBase. This is a base class for containers of objects that let their positions be accessed but not modified. Even...

How to make WPF DataGridCell ReadOnly?

I understand you can make the whole DataGrid or a whole column readyonly (IsReadOnly = true). However, at cell level this property is ready only. But I do need this level of granularity. There is blog about adding IsReadOnly to a row by changing the source code in old days when DataGrid was public domain, but now I don't have source code...

C# return non-modifiable list

I have a class which contains a List<Item> I have a getter on the class that returns this. Is there some thing I can do to ensure the user who calls cannot modify the returned List? (Since it's a reference type - I believe changes to the returned reference would affect the list stored in the source object) ...

C#: Why do mutations on readonly structs not break?

In C#, if you have a struct like so: struct Counter { private int _count; public int Value { get { return _count; } } public int Increment() { return ++_count; } } And you have a program like so: static readonly Counter counter = new Counter(); static void Main() { // print the new v...

HIbernate InvalidDataAccessApiUsageException - read-only mode

Summary: the Exception is telling me that the transaction is read-only; a debug println seems to indicate that I'm not in read-only mode. Classes edited for internet publishing - sorry if I mistyped something but this is the jist of the code giving me problems. saveOrUpdate works when called on other object types but not on this one. ...

cannot read a readonly property, compiler complains.

Hi, I'm new to Objective C, but have extensive C++ experience. I have a member variable called bOn, which I have declared as a readonly property. I then synthesize it. However, the compiler won't let me read it, saying "Instance Variable 'bOn' is declared protected". I would understand this error if I had not synthesized. Here are my...