HI,
I 'm trying to sort the rows in my datatable using select method.
I know that i can say
datatable.select("col1='test'")
which in effect is a where clause and will return n rows that satisfy the condition.
I was wondering can i do the following
datatable.select("ORDER BY col1") ---col1 is the name of hte column
I tried datatab...
I am using entities, C# and SQL Server to create an n-tier app. I am creating some base classes common to all my DAL components. In this base class, i want to handle the connection state of the ObjectContext base class inherited by entities object.
Compiling throws the following error:
The type or namespace name 'Objects'
does n...
Setup:
I'm creating a .NET WinForms application in C# to allow our technical support folks to easily perform common tasks against our product's SQL Server 2005 database. The application is using ADO.NET (SqlConnection) to connect to the database. One concern in developing this application was to minimize the overhead of connecting/re-...
Simple question really...
How can I copy a ReadOnly file?
When running a debug build of my very simple Windows Forms app, I'm getting the UnauthoriazedAccess Exception when trying to copy a read-only file from one directory to another:
FileInfo newFile = new FileInfo(fileName);
File.Copy(newFile.FullName, Path.Combine(destinationDirPa...
This could be a borderline advertisement, not to mention subjective, but the question is an honest one. For the last two months, I've been developing a new open source profiler for .NET called SlimTune Profiler (http://code.google.com/p/slimtune/).
It's a relatively new effort, but when I looked at the range of profilers available I was...
I have several solutions, each containing multiple projects, that all need to reference a single assembly, say, lib.dll.
This contains common classes and functionality which needs to be accessed between all the solutions; and I can't bring all the projects into one solution as my manager wants to be able to use different versions of li...
What is the best and most secure way to license software? Is there an existing program for doing so? I want to sell a script of mine, but I want to make sure that users cannot redistribute or sell it themselves (of course, if they deactivate the registration on their own computer and choose to resell, that is their choice).
The software...
Is it possible, using C# Automatic Properties, to create a new instance of an object?
in C# I love how I can do this:
public string ShortProp {get; set;}
is it possible to do this for objects like List that first need to be instantiated?
ie:
List<string> LongProp = new List<string>();
public List<string> LongProp {
get {
...
How do you lazy load nested lists without actually executing the query? Using a very basic example, say I have:
class CityBlock {
IList<Building> BuildingsOnBlock;
Person BlockOwner;
}
class Building {
IList<Floor> FloorsInBuilding;
}
class Floor {
IList<Cubicle> EmployeeCubicles;
}
Class Cubicle {
System.Gui...
Hello,
Normally I setup events like this...
Public Delegate Sub MySpecialEventHandler(sender as object, e as mySpecialEventEventArgs) ' ...I will not show the implementation of mySpecialEventArgs.
Public Event MySpecialEvent as MySpecialEventHandler
Private Sub OnMySpecialEvent(newStatus as string)
Raise Event MySpecialEv...
How do i allow the HttpListener in vb2005.net to allow outside access?
For testing purposes i have set it up to use the same ports as my webserver uses so there are no firewall issues.
the prefixes are set up to take the localhost on port 80
the realm is unset
AuthenticationSchemes = Net.AuthenticationSchemes.Anonymous
it works just ...
Hi all,
I have a windows console app (that accepts parameters) and runs a process.
I was wondering if there was any way to run this app from within a windows form button click event. I would like to pass an argument to it as well.
Thanks
...
When using NHibernate, you define your entites with virtual methods, and NHibernate will create a proxy object that tracks changes to your object.
In Moq, the framework will magically create a derived type from an interface or a base class. e.g.
var mock = new Mock<IFoo>();
IFoo magicFoo = mock.Object;
This is really cool. How do...
I'm trying to interface with the Google Reader (undocumented/unofficial) API using information from this page. My first step is to get a SID and token, which works fine, but I can't seem to POST anything without getting a 401 error.
Here is the code I'm using to get my SID and token:
static string getSid()
{
HttpWebRequest...
I was wondering if the enum structure type has a limit on its members. I have this very large list of "variables" that I need to store inside an enum or as constants in a class but I finally decided to store them inside a class, however, I'm being a little bit curious about the limit of members of an enum (if any).
So, do enums have a l...
I am writing a simple web service using .NET, one method is used to send a chunk of a file from the client to the server, the server opens a temp file and appends this chunk. The files are quite large 80Mb, the net work IO seems fine, but the append write to the local file is slowing down progressively as the file gets larger.
The foll...
What is the best advanced LINQ book? I'd like a book that covers in depths the inner workings of LINQ including lambdas, expression trees, etc...
...
Hi,
I have a ASP.NET application running on Windows 2003 that needs to communicate with a DB2 database that resides on the mainframe. We installed DB2 Client driver v9.5 on our server so the application can perform the connection and work with the database. The connection string to connect to the database contains the username and passw...
I'm slowly modernizing: Can I run the ASP MVC example NerdDinner on my XP Pro system? I know there is a possible issue with IIS5.1 being too old.
...
Is it possible to know the location of const variables within an exe? We were thinking of watermarking our program so that each user that downloads the program from our server will have some unique key embedded in the code.
Is there another way to do this?
...