I have a table named "Streets" in an access db, and I have opened a connection with
OleDbConnection con = OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data source=" + mdbFileName);
How can I get at my table?
...
I have some c# code that downloads files from an FTP server. It works fine when I run it and it works fine when I install it on my development machine then run it. However, when I try to install it on another machine (a Windows XP SP3 VM) it doesn't work. No exceptions are thrown or anything.
Here is the short version of my code:
re...
Given a set of entity ids, how can you efficiently delete the entities to which to ids represent, without first selecting the entity?
Here is some code, I am using now, but EF profiler is complaining at me for running N+1 queries:
var ids = GetSelectedIds();
foreach (var id in ids)
db.Workshops.DeleteObject(db.Workshop...
I know I can get whether 2 strings are equal in content, but I need to be able to get the number of characters that differ in the result of comparing 2 string values.
For instance:
"aaaBaaaCaaaDaaaEaaa"
"aaaXaaaYaaaZaaaEaaa"
so the asnwer is 3 for this case.
Is there an easy way to do this, using regex, linq or any other way?
EDIT:...
Hi
I have a gridview which will have Insert/Delete/Update.
There are two kinds of exception which i am concerning right now is Concurrency and Unique Constraint
Right now i can capture the exceptions by using
private void OnSubmitChangesCompleted(SubmitOperation so)
{
if (so.HasError)
{
//RadWindow....
Possible Duplicate:
What is NHibernate?
I've heard the name NHibernate used a lot, but I don't really understand what it is. I've read the Wikipedia article, but I don't understand how using NHibernate in my C# applications (desktop w/ WPF, web w/ ASP.NET MVC) will:
Change the code
Be easier/faster
Should I look into using...
Hi all:
For debugging purpose I'd like to know ways to test OLE DB connection string quickly.
I've found this free software, it works on my machine, tested successfully.
Is there a even quicker way to do so, maybe from command line on Windows? Because most of the time, it is the client rather than me that would do this task, so I pref...
I am reading from a NetworkStream that is in a while loop. The issue is I am seeing 100% CPU usage. Is there any way to stop this from happening?
Here is what I have so far:
while (client != null && client.Connected)
{
NetworkStream stream = client.GetStream();
data = null;
...
How do you usually name localizable resource strings in your RESX files? I used to do it manually, taking special care about resource naming and usually end up with something along these lines
UsernamePasswordLogonFailure
But with the new Resharper there is a functionality that detects and picks up string literals in code and gives yo...
I have a set of .net classes that I currently serialize and use with a bunch of other code, so the format of that xml is relatively fixed (format #1). I need to generate xml in another format (format #2) that's a pretty similar structure but not exactly the same, and am wondering the best approach for this.
For example, say these are m...
I would like to write to an Excel spreadsheet on a server which doesn't have Excel installed. So Excel automation is not possible. I also need to write to certain cells using .NET. Is this possible and how? Can the ODBC driver be used to insert data at certain sheet cells? Without using expensive third party libraries.
...
I'm wondering if there are any downsides to locking over a collection such as a List<T>, HashSet<T>, or a Dictionary<TKey, TValue> rather than a simple object.
Note: in the following examples, that is the only place where the locks occur, it's not being locked from multiple places, but the static method may be called from multiple threa...
If I have a file path like "C:\My Documents\Images\Image1.png", how can I get the parent folder name of the "Image1.png" file? In this case, "Images", but that's just a sample. I've looked through System.IO.Path and there doesn't seem to be anything there. Maybe I'm overlooking it, but I have no idea where it would be.
...
Is there a way to add a link or button in the menu that appears when you click on the top left corner of a web part in sharepoint 2010?
...
I am using a List (Of String) in WF4 because I'd like to perform set operations (like get distinct, etc.) and had a qs. about using the AddToCollection activity. Is it possible to add a number of items with one statement?
e.g. I'd like to add "alpha", "bravo", "charlie" in one activity instead of three
The Collection - String does not w...
I am developing a .net application that uses two libraries: iTextSharp for PDF creating, and DotNetZip for extracting files from zips. Both libraries are included in my application as dll's without any modification.
iTextSharp is under Affero GPL, while DotNetZip is under Microsoft Public License. The license of my application is planne...
Is it possible to use object binding to bind a windows form control to an object so that whenever the object changes the form control reflects that change.
Here's what I've done so far:
Added a data grid to the form.
Added a binding reference to the class. This added the properties of the class as columns to the datagrid.
set the ...
I'm part of a team developing ASP.Net applications using Scrum. We currently use TFS for almost all aspects of our project management, source control, testing, and bug tracking.
However, there's a gap when it comes to customer-raised bugs. Bugs found internally are easy to add to TFS allowing us to link changesets to actual bugs. Whe...
I've been trying to figure out if there is a way to get the following from a MSMQ queue:
Current message count
Average message life (on the queue)
Timestamp from first and last message (So you can use average message life to calculate a rough estimate on wait times).
The MessageQueue class in System.Messaging doesn't seem to expose a...
I've just deployed my first MVC2 application to our Local Webserver (it's in our network so it can be fixed/changed as needed). The server was originally built with .Net 2, and our network admin installed the .Net 4, so I'm not 100% sure if everything is in the correct places.
What I'm wondering is should all the System.Web.* etc DLL's ...