Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Travis.Net.Blog

Oh my beloved Time, where art thou?

  • "?" vs @param

    string sql = "SELECT COUNT(*) ";
    sql += "FROM athletes ";
    sql += "WHERE category = ? ";
    sql += "AND gender  = ? ";
     
    VS
     
    string sql = "SELECT COUNT(*) ";
    sql += "FROM athletes ";
    sql += "WHERE category = @category ";
    sql += "AND gender  = @gender ";
     
     
     

    Can I tell you how many hours I just spent on trying to get this *simple* query to work in Access via ADO.NET?  What is up with the "?" as parameters?  What happend to @param format like the SqlClient?  Why do they work in the Access Querybuilder itself, but not using ADO.NET?  Maybe I'm approaching this wrong.

  • Hosting

    I'm looking for new hosting for a friend.  I was wondering if any providers out there offer what he needs:
     
    Cheap!  :-)
    SQL Server DB and the ability to connect to the SQL DB via Enterprise Manager (A Must)
    His site needs less than 10mb of storage, so that is not an issue
    Traffic is bare minimum.  Almost no image files, strictly HTML.
    Ability to create virtual applications under the root in IIS.  (seperate web.configs, security, bin folders etc)
     
    I know maxiumumasp.com does all this, but they are *way* too expensive for his needs.
     
     

  • Class, DAL, and Performance

    Say I have a class (MyClass) with 20-30 properties.  On a page hit I instantiate MyClass and pass it to my DAL to bind the properties from a record in a database.  Then go about binding Labels, TextBoxes, etc from properties associated with MyClass. 
     
    Well what if my .aspx page only uses one property in the class?  Is it  not overkill to instantiate the class, pass it to my DAL, bind 20-30 properties only to use one string property to display in a Label?  If a page does not use all/most of the properties of a class, it seems like a lot of mashing using this method.  On a low traffic site, I am sure this is ok, but on a site that gets pounded....
     
    Or am I going about this completely wrong...  How *should* something like this be handled?  Because I am sure I am missing something.

  • C# Programming Guidlines

    Last week(?) someone posted a link or maybe a complete blog post on C# programming guidelines. (Or was it best practices?)  I cannot seem to locate it.  Anyone have a link?

  • Programming Contract Work

    Finally found some time to blog.  I have been programming for an “employer” for 6+ years.  Now I find myself doing contract work (self employed).  So basically I am clueless as to how I go about this income tax wise. 
    • Do I get a local business license?
    • Do I just go on as I have been and save a certain percentage of my income for taxes?
    • Do I file taxes just like have been?
    • I hear I can write off expenses and such since I work out of my house.  (which deserves an entry on its own)
    • Should I be saving reciepts and such?  :-)
    I suspect some readers are in the same boat and have experience with this sort of thing.  Self Employed Programmer.  Anyone have any tips or suggestions?