Tuesday, October 28, 2014

Unicode problem when saving CSV using navigator.msSaveBlob - IE

When trying to export Unicode / multibyte content using navigator.msSaveBlob, you may not get the connect correctly when opening with MS Excel. Here is a fix for that:

Note the \uFEFF character used.
    function shoot() {
    var buffer = "Hello - ഹലോ";
    var blob = new Blob(["\uFEFF" + buffer], 
        { encoding: "UTF-8", type: "text/plain;charset=UTF-8" });

    navigator.msSaveBlob(blob, "test.csv");
}

 \uFEFF is the Byte Order Marker which is used to tell the applications that this file/data is unicode or multibyte.

Saturday, October 25, 2014

K-MUG UG Review – 25 Oct 2014

Like previous events, today also we have a wonderful technology day and we had four sessions – Document DB (Pramod Vasudevan), Modern Web Architectures (Yanesh Tyagi), SQL Server Data Tools (Aparna Sekher) and SharePoint 2013 (Shalvin PD).

KMUG-25Oct2014

Friday, October 24, 2014

Malayalam article : MTA certification

Read my article on MTA – Microsoft Technology Associate – in cybermalayalam.com porta.

URL: http://cybermalayalam.com/mta-certification/

ഐ‌ടി തുടക്കക്കാർക്ക് MTA Certification

Read curretly selected mail item from Ribbon - VSTO Outlook AddIn

You need to access ActiveExplorer() so you will require reference to Microsoft.Office.Interop.Outlook.

using Outlook = Microsoft.Office.Interop.Outlook;

... 

Outlook.Application app = Globals.ThisAddIn.Application;
Outlook.Explorer exp = app.ActiveExplorer();

Outlook.Selection sel = exp.Selection;

if (sel.Count > 0) {
    dynamic mail = sel[1];
    //You will get mutiple selected items. 
    //I am taking just the first one for the sake of this example.
    MessageBox.Show(mail.Subject + " | " + mail.Body);
}

There are few methods available if you Google but I found this handy but I make sure you care about exception handling.

Version tested: I have tried this for Office 2013.

About Microsoft SQL Server Data Tools - SSDT

SSDT is an attempt to bring all the SQL server design, development, testing and manipulation jobs which are usually done by developers, especially database developers under one umbrella – which is Visual Studio.

SQL Server Data Tools were code-named ‘Juneau” which was introduced with SQL Server code name “Denali”, which later became SQL Server 2012.

SQL Server Data Tools is FREE!!!

You will be able to use the same features you were enjoying while .NET language programming in database related development as well, like: intellisense, debugging, code navigation etc.

Even though I sounded like SSDT = BIDS + SSMS + various tools, thinking about a replacement for SSMS is not there. SSMS continues to be a powerful tool for both developers and administrators. I am in love with SSMS and I see there are many things SSMS only can do, or can do more user-friendly than SSDT.

SSDT makes below template types available:

  1. Analysis Services
  2. Integration Services
  3. Reporting Services

image

Supported SQL Versions:

  • All the versions above SQL Server 2005 and SQL Database (formerly SQL Azure). However MSDN uses the wording “any SQL Server platform”. Find the below screenshot of Visual Studio solution properties list.

image

Installation:

  1. Visual Studio 2013 (All editions including Express) – You are lucky as it SSD Tools are already available as an update. But if you do not find it, you can either manage it via Extensions and Update under Tools menu or download the SSDT-BI for Visual Studio 2013.
  2. Visual Studio 2012 – Download SSDT for Visual Studio 2012 and SSDT-BI for Visual Studio 2012 also
  3. Visual Studio 2010 – Forget about this. Microsoft is not bothered about this version anymore. Database tools features were available in this version but this was ported to 2012 version as well.

Features which I felt appealing:

  1. Declarative Database Development Model – Lets developer focus on the end result rather than the scripting pains
  2. Multi version targeting
  3. SQL Database (Azure) support
  4. Versioning and source control of objects (as files)
  5. Powerful SQL Server Object Explorer (which will remind you SQL Server Management Studio)
  6. Edit table data, compare schemas execute queries
  7. Project based development vs connected database development
  8. Incremental schema deployment
  9. Schema and Data comparison
  10. Custom static code analysis extensibility
  11. Project oriented offline/disconnected database development
  12. Schema and data synchronization
  13. SQL Server unit tests
  14. Snapshots saving
  15. Editor’s ability to highlight errors (similar to .NET development)

Reference URLs:

  1. http://msdn.microsoft.com/en-in/data/tools.aspx
  2. http://msdn.microsoft.com/en-us/library/hh272686(v=vs.103).aspx
  3. http://msdn.microsoft.com/en-us/library/hh272702(v=vs.103).aspx

For me, there are still more features and bottlenecks to be experimented. I will write more later.

Thursday, October 23, 2014

New Azure portal is cool

New https://portal.azure.com/ seems great, though the old one is still very user-friendly. All the items – VM, websites, SQL Databases etc. are encapsulated under “BROWSE” section. You will not feel lost when switching from old to new interface.

image