HOW TO: Create a SQL Server Database Programmatically by Using ADO.NET and Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;305079
HOW TO: Create a SQL Server Database Programmatically by Using ADO.NET and Visual C# .NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307283