Archive for the ‘Improvements’ Category

Move data from MySQL to MS SQL

Yesterday I’ve faced the problem with moving data from MySQL to MSSQL Server. I’ve used Integration Services (DTS) to transfer data with ADO.NET connection to MySQL (via Connector/NET). After running the import process a lot of conversation errors occurs. Main problem is in difference between MySQL Int and MS SQL Int, but I used to think that in ADO.NET all datatypes are mapped to some virtual types and then back to correct types in chosen database. I had no enough time to figure out the problem, so I’ve resolved it by adding DataConversion module and I have converted all integers from MySQL to strings, and it works now, but I hate situations when I don’t now what is the problem exactly.

Categorization of search results

I’ve found today that Yahoo! lunches the Yahoo! Glue – search service which combines categorized search result from different search sources – the strategy which was chosen for one of our main projects now.

Check it out on mashable : http://mashable.com/2008/11/19/yahoo-glue-2/.

 

CheckboxSelectionModel in ExtJS grid

I’ve tried to use CheckboxSelectionModel on grid, and there are no examples in documents for. It’s not clear in documentation. Ok, so you should create CheckboxSelectionModel object before it’s passing to grid as selModel, because you should specify it in columns config property. So there is example by the steps.

  1. Create CheckboxSelectionModel:
var sm = new Ext.grid.CheckboxSelectionModel();
  1. Include created object in columns list:
columns:[

sm,


{….. rest of your columns …..}

]

  1. Provide selectionModel object as current selection model for grid. You should provide selModel property in config options:
selMode: sm

Result:


Try to parse XML (similar to Integer.TryParse).

I’ve facing following problem during my current project. We have a lot of automation here. We have plug-ins architecture inside. Plug-ins are simple classes which inherits our special interface off-course. But main issue for plug-in is to persist his status. It’s possible with properties. So plug-ins are classes with properties which are processed automatically. Under processing I’m talking about setting/getting values and storing in our system. But plug-in can contains not just properties with simple types but complex types as well. Here complex type is some class which can easily be serialized/deserialized to/from XML. So we should be able to store complex types in properties. BTW: all values are storing as strings in our system. If can’t then I’m trying to convert value to a type of property. During conversation I’m checking if the passed value can be deserialized to complex type if yes – then it’s deserialized and value successfully set. If not I’m looking for a converter if no converter found I’m trying to set value directly.

    So my actual problem is that I can’t check that string can be parsed by XML processor. For example if we have in the string special symbols it can’t be processed. So I need to do try … catch to handle errors during deserialization. So I’m wondering why haven’t Microsoft add TryParse method to XML processor.