... all I'm offering is the truth. Nothing more. RSS 2.0
# Thursday, March 12, 2009

I was investigating and en error recently with DateTime.ToString() that gave produced the following call stack:

System.FormatException: Input string was not in a correct format.

at System.DateTimeFormat.GetRealFormat(String format, DateTimeFormatInfo dtfi)

at System.DateTimeFormat.ExpandPredefinedFormat(String format, DateTime& dateTime, DateTimeFormatInfo& dtfi)

at System.DateTimeFormat.Format(DateTime dateTime, String format, DateTimeFormatInfo dtfi)

at System.DateTime.ToString(String format, IFormatProvider provider)

at MyWork.NewMethod(string a, string b)

I was doing the following…

DateTime.ToString(“o”)

…which is a valid input string for 2.0 and above but not 1.1. This would not have been issue but the test PC I ran the offending assembly on had both 1.1 and 2.0. The ToString() method took the path of least resistance and used the framework dependencies under 2.0 and not 1.1. Of course the real problem arises when you try to rerun the assembly on a machine that only has .NET 1.1, at this point the “o” option is invalid.

 

Took me a few moments to track down, and reminded me never to trust MSDN (defaults to .NET 3.x) without verifying the backward compatibility of the options.

 

 

Thursday, March 12, 2009 5:16:00 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - Trackback
.NET | C#
# Wednesday, February 25, 2009

I was getting the following error when trying to run visual studio 2003 project…

clip_image002

…this can be resolved as follows:

1. In the Internet Explorer, select the "Tools" Menu, then select "Internet Options".
2. Select the "Security" Tab in the new window.
3. Select the "Internet" globe icon.
4. Click the "Custom Level..." button at the bottom.
5. Locate the "User Authentication" section (it is at the bottom in IE7).
6. Select "Automatic logon with current username and password".
7. Click "Ok" twice to complete.

Technorati tags:
Wednesday, February 25, 2009 9:41:57 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - Trackback
Visual Studio
# Thursday, February 19, 2009

If you have done any reasonable level of SQL programming you would have been exposed to either NOLOCK or SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED (the default is READ COMMITTED). I have used these to help perform what is referred to as a ‘dirty read’, that is, ignoring any potential updates and inserts to the tables whilst performing the query. This also prevents the current query from producing and waiting for database locks.

There are a couple of other arguments that change the locking behavior, none of which I have ever had reason to use but I wanted to make a quick note of the them.

REPEATABLE READ
Locks are placed on data that is used in the query, this prevents others from updating the data, but it is possible for new rows to be inserted into the data set by other users. Concurrency is lower and this option should only be used when necessary.

SERIALIZABLE
Places a complete lock on the data set, inhibiting others from updating or inserting rows into the data set until the transaction has been completed. This is the most restrictive of all isolation levels. Concurrency is lowest with this option so this option should only be used where appropriate. This option has the same effect as setting HOLDLOCK (vs NOLOCK)  on all tables in the SELECT statement.

Technorati tags:

Thursday, February 19, 2009 2:07:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - Trackback
Sql
# Wednesday, February 18, 2009

Windows Mobile 6.5 is much more touch friendly this is one of the first decent demos I have seen since I have seen.


Windows Mobile 6.5 Running on HTC

Technorati tags:
Wednesday, February 18, 2009 10:43:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - Trackback
Mobile | Windows

When I signed up for the Microsoft My Phone service I thought “this might be pretty cool”. Backup all my critical phone data, contacts, pictures etc. Once I got past the the initial sign up and slow beta rollout process, I was greeted by a 200MB storage limitation, what is this 1997? … I have a 2GB memory card! I also have 25GB of SkyDrive space in the cloud, why the artificial restrictions.

image

As my data began to Synch it then became clear that this service only cares about what is actually stored on the main memory of my phone, it completely ignores everything about the memory card. I am not sure about other mobile OS’ but for Windows Mobile Phones storing anything in the main memory makes no sense as it will be completely lost if you have to upgrade or even reinstall the operating system and there tends not to much to space to spare.

So exactly what got backed up on my phone? Text messages, and a few jpegs that are included in the default installation. Even my contacts are stored on the memory card. I think my back up strategy will continue to be a mixture of Live Messenger Mobile (for contacts) and Live Mesh (for everything else).

Technorati tags:
Wednesday, February 18, 2009 1:24:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - Trackback
Mobile | Windows

When I signed up for the Microsoft My Phone service I thought “this might be pretty cool”. Backup all my critical phone data, contacts, pictures etc. Once I got past the the initial sign up and slow beta rollout process, I was greeted by a 200MB storage limitation, what is this 1997? … I have a 2GB memory card! I also have 25GB of SkyDrive space in the cloud, why the artificial restrictions.

image

As my data began to Synch it then became clear that this service only cares about what is actually stored on the main memory of my phone, it completely ignores everything about the memory card. I am not sure about other mobile OS’ but for Windows Mobile Phones storing anything in the main memory makes no sense as it will be completely lost if you have to upgrade or even reinstall the operating system and there tends not to much to space to spare.

So exactly what got backed up on my phone? Text messages, and a few jpegs that are included in the default installation. Even my contacts are stored on the memory card. I think my back up strategy will continue to be a mixture of Live Messenger Mobile (for contacts) and Live Mesh (for everything else).

UPDATE: There is an option to include storage cards, reinstalling this application… Live Mesh is still better I can sink photos and videos directly to my PC.

Technorati tags:
Wednesday, February 18, 2009 1:24:00 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] - Trackback
Mobile | Windows
Blogroll
Statistics
Total Posts: 330
This Year: 18
This Month: 2
This Week: 0
Comments: 30
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Mark Downie
Sign In
All Content © 2010, Mark Downie
DasBlog theme 'Business' created by Christoph De Baene (delarou)