Simon Taylor - .Net developer, Cheltenham

My record of coding problems solved and new things discovered

Integrating with Microsoft Project Server 2007 (2)

clock August 13, 2009 18:42 by author Simon

I have already done one post on integrating with project server. Since then I have had to get much more involved with it and have discovered it's a bit of a dark art to say the least. Hopefully, this post will serve as a useful resource to anyone else who needs to do the same and stop them from having to go through all of the pain that I went through.Cry More...

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Cool sharpcoder widget available

clock August 8, 2009 09:42 by author Simon

I've created a cool widget using the clearspring platform at www.clearspring.com. You can embed this widget pretty much anywhere - google, facebook your own web page etc - it's a great way of sharing links in a way that is under your control.More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Copying datarows

clock August 8, 2009 09:06 by author Simon

Some succinct code for making a copy of a row from a DataTable.More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


IronPython: Properties

clock August 8, 2009 08:42 by author Simon

To create a property in IronPython (equivalent to a C# property) you need to create the get and set functions and then pass them into the in built property() function and assign the result to a variable with the name of the property you wish to create. For example, the code below defines a getter:More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


TSQL: Drop all your tables

clock August 8, 2009 08:30 by author Simon

Some useful TSQL for dropping all of the tables in a database: More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Creating classes at runtime

clock June 14, 2009 21:55 by author Simon

I've been working on an application that has a number of forms that need to be laid out based on configuration data in the database, this enables the application to meet the requirements of many different customers. Laying out the forms based on the configuration data is relatively trivial - it is just a matter of writing the code that normally ends up in the .designer file. However, because there could be any number of controls on the form, binding an object to them is a little more tricky. I approached this problem by creating a class that describes a control that will added to the form together with a boolean, integer and string value field that is used to initialise the control and capture the users input based on the type of control. I had a list of these objects representing all of the controls that needed to be rendered on the form, to bind the controls to these objects, I needed an adapter which I created at runtime.More...

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Passing an IronPython method to a C# method that takes a delegate as a parameter

clock June 14, 2009 21:42 by author Simon

This is again IronPython 101, but again took me a little bit of time to work out how to do it. Consider the following C# delegate and method:More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


IronPython String formatting and concatenation

clock June 14, 2009 21:33 by author Simon

This is really IronPython 101 but this was a really difficult thing to find by Googling! There are also examples in IronPython in Action but again, searching for them if you're not sure what you're searching for won't get you very far. The solution is pretty similar to how you would do it in C:More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Fixing detached users in SQLServer

clock June 14, 2009 21:15 by author Simon

Especially when you restore a database that was backed up on a different server to where you are restoring it to, a sql server database user can become detached from its corresponding login, which means you won't be able to login to the database as that user. To see if there are any users in this state and to fix the problem, you need to use the sp_change_users_login stored procedure.More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Encryptor

clock June 14, 2009 20:54 by author Simon

I've written an encryption utility that I find quite useful. There is nothing special about the code that does the encryption, but I have given it a command line interface and kept the actual encryption logic in a separate assembly which can be added to other applications. What I use this for is to manually encrypt data which I then put in a database which can then be decrypted by my application by adding a reference to the dll which has the encryption logic. More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


About the author

Simon is Head of Engineering at Trigger Software, Cheltenham, UK. He is primarily a .Net developer although sometimes has to turn his hand to other technologies such as Java and Flex. Contact me.

Discount ASP

Sign in