My Experience with SQL Azure

We are in the process of developing a prototype for Windows Azure.
Since its a fairly a new technology not many online help/discussions
are available. and if there are, then they are obsolete (as these steps would become in couple of months)
the reason being, Microsoft comes out with updates for major/minor versions pretty quickly.
Anyway these are the challenges we faced until now and maybe would face some more in future. Most of them are
due to our ignorance or lack of knowledge on how it could be done in a certain way (thats one more problem with new tech, where
nobody knows what`s the standard way until you make errors).
Now Azure requires latest and greatest. Hence, we decided to use virtual machine to make Win 7 images and install azure sdk
and sql server 2008 (big mistake for sql server…as we painfully found out later that we needed SQL server 2008 R2 CTP!).
So during R&D, we realized that we could use Windows Azure with Storage as our backend. But, it turned out to be a
Hash Table, which is only used to save key value pair, where value can be anything from blob to complex objects etc. However again, we needed a RDBMS. On further research, we found a service called SQL Azure which was exactly what we required for Storage.
And now when we tried to open it with Management Studio, we could only do scripts and not objects.. Bummer!! I am more
used to the GUI aspect of sqlserver then scripts, which made us search for different alternatives in codeplex i.e.
http://hanssens.org/tools/sqlazuremanager/ which were all buggy or mostly incomplete! Turns out we had to install
SQL server 2008 R2 CTP. sigh!!! Who knew??
Once everything was set, we now had to move our existing data from oracle to Azure. We used Microsoft’s tool to migrate data, which was slow but worked fine. Finally, it was a success…Yippee!!

Simple OS A designers dream, a programmers pride

I would like an Operating System which is open source.
Which has two options when its started for the first time.(Basic, Advanced)
Basic:my mother can use.Advanced: something a hardcore programmer hacker can use
which behaves like iPhoneOS/android i.e desktop with icons only(apps)/ no tray or task bar or menus or right clicks
apps can do what ever they want.
everything set to optimal default, plug and play, like boxee, xbmc (even they are a little complicated/clunky)
A single place to store documents,music,videos,settings,app store (with repository can use windows,linux apps).
A Closed App Ecosystem (only through repos like cydia)
no need of c drive,program files.

should have good games and social apps to appeal masses
In short, i want everything which iPad has and also the things it lacks.(multitasking,flash,plugins etc)
I guess future ChromeOS would be pretty close to what i want. There is also Jolicloud

I Love Innovation

Google, Apple, Microsoft… big names you get to hear about them almost everyday and lot of flamewar going around with brand loyalty…like X company blows or Y company is awesome!! For me its the products these big names produce which i love and not the brand, i have macbookpro with windows 7 installed and use google search and alternatively use bing. My mouth waters if i see any cool innovative gadget/software which is a game changer. For me i dont care if its closed or opensource as long as its easy on the wallet (free is good too), easy to use and looks cool and if there is competition it definitely helps

Hello world!

Hello! I recently changed from Drupal to WordPress, Why? Cause, I was hearing a lot of buzz and I had nothing better to do this weekend ^_^.
I am happy i did, and my inital reaction is… Wordpress is made by designers and Drupal is made by programmers. Why do i say this? ‘Cause, WordPress  is a very user friendly and easy to manage application and at the same time powerful too, for example you can extend it using plugins and themes, especially themes. You can also make changes if you want. where as Drupal is little complex and intimidating but very powerful and extensible at the same time. Stick with it if you know your way around it.

HOWTO export/copy ADODB recordset to excel spreadsheet via IronPython

"""
Export or Copy ADODB Recordset to Excel Spreadsheet
@Author Surya Nyayapati
@Date Jun-25-2009
"""
 
import clr
 
from System.Reflection import Assembly
from System.Reflection import Missing
 
#From C:\WINDOWS\assembly Copied the Display name for ADODB
clr.AddReferenceByName('ADODB, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
from ADODB import ConnectionClass, RecordsetClass, CursorLocationEnum
 
connString = "DSN=myDsn;Uid=myUsername;Pwd=myPassword;"
 
conn = ConnectionClass()
rs = RecordsetClass()
conn.Open(connString)
 
conn.CursorLocation = CursorLocationEnum.adUseClient
query = "SELECT * FROM user_group" # Any SELECT SQL
rs = conn.Execute(query)
"""
#To iterate over Recordset
while rs.EOF <> True:	
	print "%s - %s" %(rs[0].Item[0].Name.ToString(),rs[0].Item[0].Value.ToString())
	print "%s - %s" %(rs[0].Item[1].Name.ToString(),rs[0].Item[1].Value.ToString())	
        # ...
	rs.MoveNext()
"""	
 
#Start a New Excel Instance
VSTOpath = "C:\\Program Files\\Microsoft Visual Studio 9.0\\Visual Studio Tools for Office\\PIA\\Office11\\"
 
#Load and add reference to Excel dll
excelAssemblyPath = "%sMicrosoft.Office.Interop.Excel.dll" % VSTOpath
excelAssembly = Assembly.LoadFile(excelAssemblyPath)
clr.AddReference(excelAssembly)
from Microsoft.Office.Interop import Excel
 
import System.IO.Directory
excelApp = Excel.ApplicationClass()   
excelApp.DefaultFilePath = System.IO.Directory.GetCurrentDirectory()
excelApp.Visible = True
excelApp.ScreenUpdating = False;
excelApp.DisplayAlerts = False   
excelApp.UserControl = False;
try:
	book1 = excelApp.Workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet)
	sheet1 = book1.ActiveSheet
 
        headRange = sheet1.Range("A1", "D1")	
 
	#Python does not provide built-in support for multi-dimensional arrays
	from System import Array
	array2D = Array.CreateInstance(object, 2, 4)
	array2D[0,0] = "HEADER 1"
	array2D[0,1] = "HEADER 2"
	array2D[0,2] = "HEADER 3"
	array2D[0,3] = "HEADER 4"
 
	headRange.Value2 = array2D
	headRange.Font.Bold = True
	sheet1.Range("A2").CopyFromRecordset(rs, Missing.Value, Missing.Value)
 
except StandardError, (ErrorMessage):
	print "something wrong (%s)" % ErrorMessage
 
finally:
	excelApp.ScreenUpdating = True;
        excelApp.DisplayAlerts = True;
        excelApp.UserControl = True;
	#excelApp.Quit()