I have a C#.net 2010 new application that I am writing where I use linq to sql so I can work with the datacontext object. On the first menu tab page, I update the 'main'table with default values and values the user enters. The user clicks the next button the user is allowed to change some values based upon when customers submitted work. Basically some of the dates that are loaded on the first page come off of a schedule due date table. If the customer submits various parts of the paperwork late, the user changes the dates in the database.
So the question is if a date was loaded into a sql server 2008 r2 datqabase, and the user finds that they need to change the value to NULL is that allowed? Basically on some of the paperwork that is supplied by the customer if they do not supply a date, the data needs to be set to NULL. Thus in the application how do I pass the null value to the database via the datacontext object? Do I pass the value as '' or 'NULL', or some other value?
Thus can you tell me how to pass this Null value to the appropriate column in the database?
You will probably need to add it to the registry in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run. But you may find that your users have their own ideas as to whether they want this to happen or not.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
Depends Mark upon what the developer is trying to achieve. Hence, the reason why I chose the suggestion icon. Just another option to consider that's all I was trying to get at. I don't know the specifics of what the developer is hoping to accomplish with the "form" app.
Under Windows 7, a service cannot display a Form for security reasons. Well, it could, but at best, it'll show up on a seperate Desktop and the user would be informed that a service is showing something that might need the users attention. If OK'd, it would switch Desktops. This is not something I would use in a production app at all.
The answers here have assumed that you want your application to open automatically when Windows is started.
I am wondering if what you are really asking is: how do you open your application when a file with the unique extension you are using for files you save is double-clicked ?
Please clarify your question.
"... Sturgeon's revelation. It came to him that Science Fiction is indeed ninety-percent crud, but that also—Eureka!—ninety-percent of everything is crud. All things—cars, books, cheeses, hairstyles, people and pins are, to the expert and discerning eye, crud, except for the acceptable tithe which we each happen to like." early 1950's quote from Venture Sci-Fi Magazine on the origin of Sturgeon's Law, by author Theodore Sturgeon: source Oxford English Dictionary on-line "Word-of-the-Day."
when do i need to use theSerializationAttribute , meaning when do i need to write [Serializable] above a class ?
i found an example for XmlSerializer and no [Serializable] tag was needed to serialize and DE-serialize all the classes there.
another thing i cant understand or find any doucimentation is HOW serilization really works. how is the magic of object to strean and vice versa works.
This attribute marks types as serialisable through the standard serialisation process (using a BinaryFormatter or SoapFormatter). Despite its similar appearance, the XmlSerializer uses a different pathway, and the [Serializable] attribute has no effect there (instead, use [XmlSerializable]).
Standard ([Serializable]) serialisation stores the complete internal state of the object, by serialising private fields. To be able to use it, every field within the type must itself be serialisable (either by being a CLR type or itself being marked as [Serialiazable]), because the complete state must be available to the serialiser. There is an exception to this, if you explicitly mark some fields as [NonSerializable]. In contrast, the XML serialisation can only be applied to public properties, and you need to reconstruct the internal state of the object to an equivalent state based on the value of those properties.
You should use [Serializable] and IFormatters when you want to save or transfer a complete dump of an object, and reconstruct it exactly as it was before. For example, classes which are to be passed across AppDomain or web service boundaries need to either be marshalled by reference or serialisable. You should use XML serialisation and [XmlSerializable] if you want to use XML to save or transfer a high level view of an object, and you can use the public properties to sufficiently reconstruct the target object.
The article you linked to is quite good and once you understand that the XML serialiser is a separate thing, hopefully it will help you.
I have a Windows.Forms.ListView control. On this control I need to have 310 columns. While scrolling through the listview the first 245 display without problems. After that, the column headers stop scrolling, but the data continues to scroll. Is there a setting somewhere for the max number of column headers that are allowed? Any idea what might be causing this?
I've learned a little more about what is going on with this. It isn't a problem with the number of columns, but the total width of all the columns. If I give each column a width of 140 then I have a problem scrolling. If I give each column a width of only 100 with 310 columns then there is no problem.
listView1.View = View.Details;
listView1.MultiSelect = false;
listView1.FullRowSelect = true;
listView1.HideSelection = false;
for (int i = 0; i < 310; i++)
ListViewItem itm = listView1.Items.Add("newRow");
foreach (ColumnHeader columnHeader in listView1.Columns)