.net

@“Data Source=(local)\ SIRSYSTEM \ HEY;” – can’t connect if a string includes SIRSYSTEM

Hi The name of my MS Sql server instance is HEY, but when trying to log on to Sql server via Microsoft Sql management studio, the login window displays as the name of a server "SIRSYSTEM\HEY". What is SIRSYSTEM? A name of default server instance? If so, then why can’t I connect to HEY using the following connection string ( in Ado.n...

Is there a built-in zip library in .NET 3.5?

Is there a built-in zip library in .NET 3.5? If not, what are the popular open source .net zip libraries. ...

Why can’t I use a SqlConnection instance until the SqlDataReader is closed?

Hi, From MSDN: While the SqlDataReader is being used, the associated SqlConnection is busy serving the SqlDataReader, and no other operations can be performed on the SqlConnection other than closing it. This is the case until the Close method of the SqlDataReader is called. For example, you cannot retrieve output parameters until af...

Where can one acquire the Visual J# Merge Module for use with Visual Studio 2008?

I've inherited an application which depends on a third-party library, which in turn depends on Visual J#.NET. The application was previously being developed on Visual Studio 2005, and I've got it building mostly successfully on VS2008. Amongst other components, it included a Deployment Project which built a couple of executables (plus...

TableAdapter - updating without a key

Hi, I'm a total newbie at the .net c# business and dove in this last week creating a form application to shuffle data around for SSIS configurations. The geniuses at MS decided not to apply a key to the table I'm working with - and generating a composite key of the two candidate fields will not work due to their combined length being t...

Large OR Expression in Castle.ActiveRecord

Hello. I am triyng to a do psuedo-fuzzy logic query in active record. How do I express: field1 like 'A' or field2 like 'A' or field3 like 'A' or field1 like 'B' or field2 like 'B' or field3 like 'B' using the ICriteria objects...where the 'likes' need to be InsensitiveLikeExpressions? ...

Should I learn Linq to SQL even though its being rolled into Entity Framework?

I am looking to learn Linq to query MS SQL databases, but am unsure of which path to take. I read recently that Linq to SQL is being rolled into Entity Framework, and development has maybe stagnated. Is it worth learning Linq to SQL still? Or should I be focusing on Entity Framework or another Object Relational Model like Ideablade's De...

Algorithm for matching lists of integers

For each day we have approximately 50,000 instances of a data structure (this could eventually grow to be much larger) that encapsulate the following: DateTime AsOfDate; int key; List<int> values; // list of distinct integers This is probably not relevant but the list values is a list of distinct integers with the property that for a ...

How to check programatically whether web server has http compression enabled?

I want to check whether web server has http compression enabled, and a particular compression (i.e. Gzip, Deflate, Compress) is enabled? Or If I request data through WebClient Object in .net by setting Accept-Encoding to "gzip, deflate" how can I know whether the retrieved data is compressed before I process it? ...

"Speech bubble" notifications

I'm trying to get a notification to pop up something like these bubbles in an MFC application: I'm currently making an interface mockup in C# to show some stakeholders, so it would be nice to have it there too. It doesn't necessarily have to be speech-bubble-esque: it could be something like a tooltip - but it does have to appear w...

select two attributes in a node using LINQ

I have the following node: <NodeA desc="Cheap Item 1" category="Cooking" /> I selected the 'category' attribute using the following: .Where(attr => attr.Name == "category") .Select(attr => attr.Value); How can I select both the 'desc' and 'category' now ...

How do i read a base64 image in WPF?

I know how to do it in WinForms byte[] binaryData = Convert.FromBase64String(bgImage64); image = Image.FromStream(new MemoryStream(binaryData)); but how do i do the same thing in WPF? ...

What are the OSS .net/java projects which has utilised most SOLID Principles in a rightway?

I would like to see/learn how solid principles are utilized in a right way in a real projects. Or there is none? ...

Masked TextBox, how to include the promptchar to value?

How to include the prompt char on masked textbox's Text? I also want to save the prompt char Example i specify mask: &&&&/&& And prompt char of _ Then I enter 12 4/5. the program should save it as 12_4/5. Anything left blank should be converted to prompt char when getting the masked Textbox's Text [EDIT] Found it, set TaskMaskF...

how to use your same Domain entities throug a .Net webservice?

if you have an entity which is reference in the client and a webservice like this public class Post { public int ID {get; set;} string Data {get; set;} } public class MyService: System.Web.Services.WebService { [WebMethod] public int Write (Post post) { //Do stuff ...

UnitTesting Properties in .Net?

I am working on a lib that I want to release in open source. I have started writing the tests for the code, and I was wondering how I am suppose to test a property in a .Net object. Lets say I have the following: public class Person{ #region variables private string _name = String.Empty; private string _surname = String.Em...

.NET HtmlButton always triggers validators

I have created a server control out of the HtmlButton with validation disabled. <button runat="server" causesvalidation="false" /> NOT the input button!!! <input type="button" runat="server /> I have a bunch of validators on my form and when i click the HtmlButton they still run the validators. If I use the input button there is no...

OutOfMemoryException On Mobile Device

I'm developing an application that uses a mobile device to take a photo and send it using a webservice. But after I've taken 4 photos I am getting an OutOfMemoryException in the code below. I tried calling GC.Collect() but it didn't help either. Maybe someone here could be give me an advice how to handle this problem. public static Bitm...

ListView Cursor changing & flickering

I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then back to what I asked it to be. I'm trying to isolate this flicker/changing to the hand cursor but can't figure out where it's occuring or ...

Windows Mobile API calls from .NET - what dll and what are the enum values

I am a newbie to API calls in .NET. I am looking at the documentation for a method I want to call here EDIT The method is a Windows Mobile API call. To call it, I need to know what dll it is in and what the values are for any parameter flags (and other stuff but this is just an example). So where do I find this out? It's not on the ...