Raw sql query text in .net
Is it possible to get somehow the query text, that SqlCommand generates? ...
Is it possible to get somehow the query text, that SqlCommand generates? ...
I have a .NET application (WPF but that doesn't really matter) running on Windows 7 (x86). I want to connect to the internet from my application to call a web service. When there is a wifi connection, I want to use that. If there is no wifi connection, I want to automatically connect to a GPRS connection setting defined in the OS (e.g. i...
I have come up with 2 methods for installing a local database with my WPF application: Create a backup of the DB, then restore in the installer via SMO Script the database install and execute it via ADO or osql.exe I'm required to provide an upgrade path, rather than just dropping the currently installed databases. Are there other m...
in my window i have tree view and a text block. tree view is bound to a view model. tree nodes are bound to another view model. the tree view model provides a list of top level tree nodes, and the view model for tree nodes provides the list of node children. there is no notion of the currently selected node in the tree in my view models....
Hello, I was following the instructions in this book, chapter on Resources etc. and what I can't quite figure out is, how do I replace this: images.Add(new BitmapImage(new Uri(@"/Images/Deer.jpg", UriKind.Relative))); images.Add(new BitmapImage(new Uri(@"/Images/Dogs.jpg", UriKind.Relative))); images.Add(new BitmapImage(new Uri(@"/Image...
What exactly are performance counters and how do they work? Are they specific to Windows or they are an operating system level concept and available on Linux etc as well? How can I use them in my .NET application to measure execution times of various parts of my application? I googled but surprisingly didn't find any great references....
I'm quite new in F#. I guess arrays are still collections, so I could use Seq for iterating the array like this: [|"a"; "b"|] |> Seq.map (fun f -> printfn "a") |> ignore;; But that doesn't work - it prints nothing. On the other hand if I use Array, it prints the strings: [|"a"; "b"|] |> Array.map (fun f -> printfn "a") |> ignore;; ...
Hello everyone, I am using VSTS 2010 + C# + .Net 4.0 + IIS 7.5 + Windows 7. I am following MSDN sample here without any modifications, http://msdn.microsoft.com/en-us/library/ms733766.aspx When I open the service.svc file (in IIS manager, right click the svc file and select browse) in IIS, there is an error like this, any ideas what is...
I'd like a documentation tool that uses a less verbose markup. Filling my comments with XML just seems like an unnecessary eye sore, and a huge waste of key strokes should I have to edit something outside of VS. I spend a lot more time in the ruby world and would love to find something more like YARD. I have a feeling this is a pipe dr...
i get the error "DataSetSharedkey.sharedkeyDBDataTable can not converted to string Dim sharedkeyFromDB As New DataSetSharedKeyTableAdapters.sharedkeyDBTableAdapter Dim test As String = sharedkeyFromDB.GetSharedkeyByUsername(tbUserName.ToString) my GetSharedkeyByUsername Statment look like SELECT sharedKey FROM sharedkeyDB WH...
I'm debugging a web service and only the first time I connect to it I get this exception on the DefaultWsdlHelpGenerator.aspx(?) class (take a look at the path) Now it seems to be related to compliance of the basic profile 1.1 but I have that turned off in the config file. <configuration> <system.web> <webServices> <confor...
We need to protect connection strings during development. On servers we use DPAPI which works fine. DPAPI is not an option during dev since the connection strings will need to be decrypted on many machines. Some of the user names/password used for dev are rather sensitive and we don't want them floating around. It's fine for all the ...
SHORT FORM(!) In response the Jon Skeet's comment, what I want C# to be to do is to allow a generic, at compile time, to expand out and derive from one of it's generic parameters (as Kirk Woll demonstrates): public class Generic<TBase> : TBase { } This class, of course, would not be able to override any members of TBase (unless perh...
Hi All, So I'm starting to work with the new workflow enginge (wf4) after previously working with 3.5. And I must say it is greatly improved! However, now I am trying to port over some existing workflows to WF4 and have ran into some snags (as is always the case). So my main problem is that in WF3, it was all interface based and the ...
My company is planning to build a specific CRM/ERP software for our customer. I'm looking for some best pratices / ressources in order to build software like this. We are in .NET/C# environnement. ...
I realize this is a very strange question. Let me just say that I have my reasons. (I tend to write very long, wordy questions; I want to keep this one short.) If I have some type T, can I use reflection to define a new type, let's call it T2, that will basically be identical to T? What I'm looking for is essentially a dynamic way to do...
I am drawing a block of text using a FormattedText object and DrawingContext.DrawText(...) and I am wondering if there is any way to add more space between the glyphs. If not, I can always draw each glyph separately and manage the location so I can add the space manually, but I am hoping for an easier way. jorj ...
I understand the concept of Fault Contracts in WCF, but they seem to be tightly coupled to WCF and SOAP in particular. I've created a set of services that are separate from the contract definitions and the implementations could be used in many ways, not just WCF/SOAP. For instance, if I wanted to create a RESTful service, or just use t...
I created a Process. That one has a MainWindow I want to SendKeys.Send("+F") (CTRL+F) to, but I don't know how to do this. So how is this done? ...
I'm on my first MVC project and still haven't got a complete hang of it. I ran into this issue: I have this in my View (Home/Index.aspx) <% using (Html.BeginForm()) { %> <fieldset> <p> <%: Html.TextBox("A")%> <%: Html.TextBox("B") %> <%: Html.ActionLink("Submit", "Create", "Home")%> </p> </fieldset> <% } %> I have this...