The techie in me RSS 2.0
 Monday, October 27, 2008

Check out this translation bot, this is really cool, just add  mtbot@hotmail.com to your msn messenger contacts and start chatting it will do the translation for you.... cool isnt it.. messenger is available in Windows mobile too..

see details here....

Monday, October 27, 2008 10:24:10 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Windows Mobile
 Sunday, May 18, 2008

What is the easy and quick way to learn new things ? The answer is, look at samples or FAQ.

Well the obvious next question is how to find out if samples are installed, if they are installed, where are they ?

Visual studio 2008 made it more simple, you can find link to samples inside your VS2008 Help menu itself.

see the screen shot below.

vs2008SampleHelpMenu

 

Wow!, Visual studio again saved my time :)

Remember that you have to unzip the files... as always there are instructions on what to do.

Sunday, May 18, 2008 1:17:35 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Visual Studio
 Saturday, May 17, 2008

If you have worked with strongly typed dataset, it is very likely that you must have faced this annoying exception regularly. The error message will be something like this.

The value for column \'ColumnName\' in table \'TableName\' is DBNull.

With exception type : System.Data.StrongTypingException

Well that's a typical message ain't it ? But interesting part is, if you see the property code in the dataset class it will similar to

get {
    try {
        return ((global::System.String)(this[this.tableName.Column]));
    }
    catch (global::System.InvalidCastException e) {
        throw new global::System.Data.StrongTypingException("The value for column \'Column\' 
                                 in table \'TableName\' is DBNull.", e);
    }
}
set {
    this[this.TableName.Column] = value;
}

Now from the code you can see that, if you are thinking of comparing the field with Dbnull or null or some value still it will give the error. It is a InvalidCast exception.

There is a simple method to solve this issue, when you use the xsd.exe(or VS IDE) to generate the dataset class give a value for the 'null value'

This is how you do it.

1. Add codegen namespace in the scheme

In the xsd file(schema) add the below line to add the namespace immediately after targetnamespace

xmlns:codegen="urn:schemas-microsoft-com:xml-msprop

2. Add the 'null value' to the elements you want to protect from this error.

for ex :

<xs:element name="Column1" codegen:nullValue="-1" type="xs:string" minOccurs="0" />

The bold attribute sets the nullvalue.

 

Thats it, then generate your typed dataset, and you will no longer have the weird exception.

If you really dont want to touch the xsd, there is another way of getting rid of this, the dataset class gives a method 'IsColumnNull', use this method in your code to check if its null :)

The above information is extracted from MS KB article

 

Keep strong typing :)

-Rujith

Saturday, May 17, 2008 1:21:57 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding
 Thursday, April 24, 2008

Well, Coding has always been the best part like my job. I really enjoy it, after long time I am coding again, I want to be programmer again. I have been involved in all design discussions, brainstorming sessions for all the complex problems and all those long long sleepy meetings :). But yesterday whole day I was coding, thinking about logic, thinking about shortcuts etc, it was fun , I dono what people sitting near me must have thought about me but I really enjoyed it.

 

Thursday, April 24, 2008 10:14:37 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -

 Tuesday, April 15, 2008

Exporting or import excel data to/from xml is pretty simple and straight forward after office 2003. You dont have to write any code or macros for the straight forward export. I have found an add-in which was very useful for me when I was doing couple of exports.

The good thing about this add-in is you dont have specify any schema to get the data, simply select the range, and select if the first row is the column heading thats it, you get the xml data within couple of clicks. Well its not just that, it can help you to create XSD files for XML maps, rename the <Root> and <Row> elements, or refresh all of the XML maps in a workbook.

I highly recommend this add-in if you are using any kind of xml import or export using Excel 2003.

Read more about the add-in here

 

-Rujith

 

Tuesday, April 15, 2008 3:02:01 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Office
 Sunday, April 06, 2008

I saw this very useful page for comparison of major features between popular version of Windows mobile.

Its interesting to see that there are not many featues added in 6.1, rather thats why its 6.1 not 7.0 :).

One intresting and much required feature that I noticed in 6.1 is auto pairing with bluetooth headsets. Who ever have had exprience with pairing their headset each time once it goes out of range would appreciate this feature. And this page is very nice to see the quick list of features that you will be intrested in, especially if you already familier with Windows mobile ver 6.0 or 5.0

I am waiting my finger's crossed for my T mobile Vario II update, which should be available here soon

 

-Rujith

Sunday, April 06, 2008 12:33:26 PM (GMT Standard Time, UTC+00:00)  #    Comments [1] -
Windows Mobile
About me
Name : Rujith Anand Send mail to the author(s)
Archive
<October 2008>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
Blogs I read
Disclaimer

Disclaimer
Postings are provided as is with no warranties, and confer no rights. Opinions expressed here are my own delusions; my employers at best shake their heads and sigh, at worst repudiate the content with extreme prejudice, whenever it manages to appear on their radar.

© Copyright 2012
Rujith Anand

Statistics
Advertisement
All Content © 2012, Rujith Anand