Devlico.Us
CodeBetter.Com

Browse by Tags

  • Tip: export to CSV using ADO.NET

    A friend of mine was telling me about a bug he found in one of his applications caused by a simple lack of escaping quotes when producing CSV files. It immediately reminded me of an old trick in .NET. If you really want, you can create CSV files using ADO.NET and OLE-DB (or ODBC.) I wouldn't necessarily...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 09-17-2008
  • Software I can't work without

    I'm about to configure a new development machine this week. It's going to be my 3rd install from scratch in the last 12 months, which I know is not all that much, but certainly more than I wish I had to. Besides the common software development tools, like Visual Studio, SQL Server, Ruby, Office...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 07-31-2008
  • It's obvious, use TimeSpans to measure time

    I know, this is probably not news to anyone. TimeSpan is the native .NET type to represent time intervals. But answer quickly, SqlCommand.CommandTimeout represents the interval in milliseconds, seconds, or minutes? What about System.Timers.Timer.Interval ? To circumvent this situation we see all sorts...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 07-24-2008
  • UdtTypeName and .NET data types in SQL

    We are working on SQL 2008 for a new project with the intent to leverage the new data types , in this case especially the HIERARCHYID data type. One of the stored procedures we created had a parameter of type HIERARCHYID . The code that calls the stored procedure was something like this. SqlHierarchyId...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 06-11-2008
  • Coding style per project

    A few months ago, when I installed Visual Studio 2008 on my system, I opened one of my projects, did the usual project conversion, edited some files, created a few others, saved, tested, and checked in source control. Another developer working on the same project, also with VS2008, later edited some...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 06-01-2008
  • Unescape my Strings

    Since I started using Visual Studio 2005 and now 2008 it bugs me that strings in the debug windows (Immediate, Watch, Locals, Autos, etc) are automatically escaped in C# syntax (well, at least in C# projects.) Let's assume we are writing some code that produces HTML (or XML, or SQL, or JSON, etc...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 05-07-2008
  • Wrong .Net Version being loaded

    At work one application has this intermittend problem that started when the developer started to use telerik's r.a.d. web controls. Once in a while, for some (until today) unexplained reasons, the telerik controls would start throwing this error: This control is complied for ASP.NET 1.x. Please use...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 04-23-2008
  • Creating Windows Services

    How to Create Windows Services It's not uncommon for an enterprise application to need some form of background processes to do continuous work. These could be tasks such as Cleanup abandoned shopping carts Delete temporary files left behind by some report or image generation feature Send email notifications...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 03-31-2008
  • Edit and Continue

    I may very well be the last one to figure this one out, but I always thought that the Edit and Continue option in Visual Studio 2005 and 2008 was a myth. I always made certain that the Enable Edit and Continue check-box was firmly checked, as shown below, but I had never gotten the feature to work. With...
    Posted to Sergio Pereira (Weblog) by sergiopereira on 03-29-2008
  • 42m is not a constant

    Here's a little CLR tidbit I picked up today while writing a [RowTest] with MbUnit. If you want to specify a decimal value in C#, you add the suffix m or M . You can read all about it here . This means you might have something in your code like this: decimal myBigMoney = 19.95m; Well, it turns out...
    Posted to Christopher Bennage (Weblog) by Christopher Bennage on 10-30-2007
Page 1 of 2 (11 items) 1 2 Next >

Our Sponsors

Red-Gate!