Biztalk Musings

Biztalk and its use in Healthcare

WCF of WebAPI?

clock February 29, 2012 22:17 by author btsguy

http://mattmilner.com/Milner/Blog/post/2012/02/28/WebAPI-or-WCF.aspx



Google Recaptcha in MVC3

clock February 29, 2012 21:09 by author btsguy

http://www.tkglaser.net/2011/10/google-recaptcha-in-aspnet-mvc-3-using.html



MVC Edit for Method

clock February 29, 2012 21:08 by author btsguy

http://www.pearson-and-steel.co.uk/how-to-use-the-html-editorfor-method/



jQuery,MVV,Knockout

clock February 29, 2012 19:47 by author btsguy

jsfiddle.net



MVC4

clock February 23, 2012 21:07 by author btsguy

http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2364



Make GMAIL secure!

clock February 23, 2012 19:17 by author btsguy

http://howto.cnet.com/8301-11310_39-20070429-285/how-to-secure-your-gmail-account/



MSMQ Large Messages

clock February 23, 2012 17:47 by author btsguy

http://blogs.msdn.com/b/johnbreakwell/archive/2007/08/22/how-to-send-msmq-messages-over-4mb-in-size-1-using-mqrtlarge-dll.aspx

http://msdn.microsoft.com/en-us/library/4ey7x820.aspx



Export to Excel from SQL

clock February 16, 2012 21:05 by author btsguy

alter procedure usp_Export2ExcelVS
(
@db_name varchar(100),
@table_name varchar(100), 
@file_name varchar(100)
)
as

--Generate column names as a recordset
declare @columns varchar(8000), @sql varchar(8000), @data_file varchar(100)
select
@columns=coalesce(@columns+',','')+column_name
from
information_schema.columns
where
table_name=@table_name

select @columns = '''''' + replace(@columns,',',''''',''''') + ''''''

print @columns
--Create a dummy file to have actual data
select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.xls'

print @data_file

--Generate column names in the passed EXCEL file
set @sql='exec master..xp_cmdshell ''bcp " select '+@columns+' as t" queryout "'+@file_name+'" -c -T -S "<server>"'''
exec(@sql)

--Generate data in the dummy file
set @sql='exec master..xp_cmdshell ''bcp "select * from '+@db_name+'..'+@table_name+'" queryout "'+@data_file+'" -c -T -S "<server>"'''
exec(@sql)

--Copy dummy file to passed EXCEL file
set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' >> "'+@file_name+'"'''
exec(@sql)

--Delete dummy file
set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''
exec(@sql)
GO

/*
exec usp_Export2ExcelVS 'Northwind','OrderHistory','c:\temp\excel.xlsx'
*/



ASP.NET MVC4 (Beta) Released

clock February 16, 2012 16:26 by author btsguy

http://www.asp.net/whitepapers/mvc4-release-notes



jQuery vs KendoUI

clock February 14, 2012 18:26 by author btsguy

http://jqueryuivskendoui.com/